Merge branch 'main' into #134-fill-users-data-for-resume
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-t border-gray-200">
|
||||
<div class="grid grid-cols-1 gap-2 p-4 md:grid-cols-2 md:gap-4">
|
||||
<div class="grid grid-cols-1 gap-2 p-4 md:grid-cols-3 md:gap-4">
|
||||
<Listbox
|
||||
v-model="form.user"
|
||||
as="div"
|
||||
@@ -159,6 +159,82 @@
|
||||
</transition>
|
||||
</div>
|
||||
</Listbox>
|
||||
<Listbox
|
||||
v-model="form.type"
|
||||
as="div"
|
||||
>
|
||||
<ListboxLabel class="block mb-2 text-sm font-medium text-gray-700">
|
||||
Rodzaj wniosku
|
||||
</ListboxLabel>
|
||||
<div class="relative mt-1 sm:mt-0">
|
||||
<ListboxButton
|
||||
class="relative py-2 pr-10 pl-3 w-full max-w-lg h-10 text-left bg-white rounded-md border border-gray-300 focus:border-blumilk-500 focus:outline-none focus:ring-1 focus:ring-blumilk-500 shadow-sm cursor-default sm:text-sm"
|
||||
>
|
||||
<VacationType
|
||||
v-if="form.type"
|
||||
:type="form.type.value"
|
||||
/>
|
||||
|
||||
<span
|
||||
v-else
|
||||
class="flex items-center"
|
||||
>
|
||||
Wszystkie
|
||||
</span>
|
||||
<span class="flex absolute inset-y-0 right-0 items-center pr-2 pointer-events-none">
|
||||
<SelectorIcon class="w-5 h-5 text-gray-400" />
|
||||
</span>
|
||||
</ListboxButton>
|
||||
|
||||
<transition
|
||||
leave-active-class="transition ease-in duration-100"
|
||||
leave-from-class="opacity-100"
|
||||
leave-to-class="opacity-0"
|
||||
>
|
||||
<ListboxOptions
|
||||
class="overflow-auto absolute z-10 py-1 mt-1 w-full max-w-lg max-h-60 text-base bg-white rounded-md focus:outline-none ring-1 ring-black ring-opacity-5 shadow-lg sm:text-sm"
|
||||
>
|
||||
<ListboxOption
|
||||
v-slot="{ active, selected }"
|
||||
as="template"
|
||||
:value="null"
|
||||
>
|
||||
<li
|
||||
:class="[active ? 'bg-gray-100' : 'text-gray-900', 'cursor-default truncate select-none relative py-2 pl-3 pr-9']"
|
||||
>
|
||||
Wszystkie
|
||||
|
||||
<span
|
||||
v-if="selected"
|
||||
:class="['text-blumilk-600 absolute inset-y-0 right-0 flex items-center pr-4']"
|
||||
>
|
||||
<CheckIcon class="w-5 h-5" />
|
||||
</span>
|
||||
</li>
|
||||
</ListboxOption>
|
||||
<ListboxOption
|
||||
v-for="type in types"
|
||||
:key="type.value"
|
||||
v-slot="{ active }"
|
||||
as="template"
|
||||
:value="type"
|
||||
>
|
||||
<li
|
||||
:class="[active ? 'bg-gray-100' : 'text-gray-900', 'cursor-default truncate select-none relative py-2 pl-3 pr-9']"
|
||||
>
|
||||
<VacationType :type="type.value" />
|
||||
<span
|
||||
v-if="form.type?.value === type.value"
|
||||
:class="['text-blumilk-600 absolute inset-y-0 right-0 flex items-center pr-4']"
|
||||
>
|
||||
<CheckIcon class="w-5 h-5" />
|
||||
</span>
|
||||
</li>
|
||||
</ListboxOption>
|
||||
</ListboxOptions>
|
||||
</transition>
|
||||
</div>
|
||||
</Listbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-auto xl:overflow-visible">
|
||||
@@ -294,6 +370,7 @@ const props = defineProps({
|
||||
requests: Object,
|
||||
users: Object,
|
||||
filters: Object,
|
||||
types: Object,
|
||||
})
|
||||
|
||||
const statuses = [
|
||||
@@ -322,12 +399,17 @@ const statuses = [
|
||||
const form = reactive({
|
||||
user: props.users.data.find(user => user.id === props.filters.user) ?? null,
|
||||
status: statuses.find(status => status.value === props.filters.status) ?? statuses[0],
|
||||
type: props.types.find(type => type.value === props.filters.type) ?? null,
|
||||
})
|
||||
|
||||
watch(form, debounce(() => {
|
||||
Inertia.get('/vacation/requests', { user: form.user?.id, status: form.status.value }, {
|
||||
Inertia.get('/vacation/requests', {
|
||||
user: form.user?.id,
|
||||
status: form.status.value,
|
||||
type: form.type?.value,
|
||||
}, {
|
||||
preserveState: true,
|
||||
replace: true,
|
||||
})
|
||||
}, 300))
|
||||
}, 150))
|
||||
</script>
|
||||
|
@@ -78,5 +78,41 @@
|
||||
"Resume has been deleted.": "CV zostało usunięte.",
|
||||
"Resume has been created.": "CV zostało utworzone.",
|
||||
"Technology :name has been created.": "Technologia :name została utworzona.",
|
||||
"Technology :name has been deleted.": "Technologia :name została usunięta."
|
||||
"Technology :name has been deleted.": "Technologia :name została usunięta.",
|
||||
"The vacation request :title has been created successfully.": "Wniosek urlopowy :title został utworzony pomyślnie.",
|
||||
":x: I don't recognize the command. List of all commands:": ":x: Nie rozpoznaję polecenia. Lista wszystkich poleceń:",
|
||||
"Summary for the day :day": "Podsumowanie dla dnia :day",
|
||||
"Daily summary": "Podsumowanie dnia",
|
||||
"Give the keys to the specified user": "Przekaż klucze wskazanemu użytkownikowi",
|
||||
"You don't have any key to give": "Nie masz żadnego klucza do przekazania",
|
||||
"You can't give the keys to yourself :dzban:": "Nie możesz przekazać sobie kluczy :dzban:",
|
||||
":white_check_mark: Key no. :key has been given to <@:user>": ":white_check_mark: Klucz nr :key został przekazany użytkownikowi <@:user>",
|
||||
"You must specified the user to whom you want to give the keys": "Musisz podać użytkownika, któremu chcesz przekazać klucze",
|
||||
"Show all available commands": "Wyświetl wszystkie dostępne polecenia",
|
||||
"Available commands:": "Dostępne polecenia:",
|
||||
"Work remotely today": "Pracuj dzisiaj zdalnie",
|
||||
":white_check_mark: You work remotely today": ":white_check_mark: Pracujesz dzisiaj zdalnie",
|
||||
"List of all keys": "Lista wszystkich kluczy",
|
||||
"Keys list :key:": "Lista kluczy :key:",
|
||||
"Take keys from specified user": "Zabierz klucze wskazanemu użytkownikowi",
|
||||
"User <@:user> does not have any keys": "Użytkownik <@:user> nie ma żadnych kluczy",
|
||||
"You can't take the keys from yourself :dzban:": "Nie możesz zabrać sobie kluczy :dzban:",
|
||||
"You must specified the user you want to take the keys from": "Musisz podać użytkownika, któremu chcesz zabrać klucze",
|
||||
"User :input does not exist in toby": "Użytkownik :input nie istnieje w tobym",
|
||||
":white_check_mark: Key no. :key has been taken from user <@:user>": ":white_check_mark: Klucz nr :key został zabrany użytkownikowi <@:user>",
|
||||
"Absences :palm_tree:": "Nieobecności :palm_tree:",
|
||||
"Everybody works today :muscle:": "Wszyscy dzisiaj pracują :muscle:",
|
||||
"Birthdays :birthday:": "Urodziny :birthday:",
|
||||
"Nobody has a birthday today :cry:": "Dzisiaj nikt nie ma urodzin :cry:",
|
||||
"Remote work :house_with_garden:": "Praca zdalna :house_with_garden:",
|
||||
"Everybody is in the office :boom:": "Wszyscy dzisiaj są w biurze :boom:",
|
||||
"There are no keys in toby": "Nie ma żadnych kluczy w tobym",
|
||||
"<:url|Request no. :request> for user :user (:date)": "<:url Wniosek urlopowy nr :request użytkownika :user (:date)",
|
||||
"The year period for given year does not exist.": "Okres roczny dla danego roku nie istnieje",
|
||||
"Daily summary for day :day": "Podsumowanie dla dnia :day",
|
||||
"Requests wait for your approval - status for day :date:": "Wnioski oczekujące na Twoją akcję - stan na dzień :date:",
|
||||
"Requests list waits for your approval - status for day :date:": "Lista wniosków oczekujących na Twoją akcję - stan na dzień :date:",
|
||||
"- [request no. :request](:url) of user :user (:startDate - :endDate)": "- [wniosek nr :request](:url) użytkownika :user (:startDate - :endDate)",
|
||||
"Go to requests": "Przejdź do wniosków",
|
||||
"See details": "Zobacz szczegóły"
|
||||
}
|
||||
|
Reference in New Issue
Block a user