#22 - cr fixes
This commit is contained in:
60
resources/js/Composables/monthInfo.js
Normal file
60
resources/js/Composables/monthInfo.js
Normal file
@@ -0,0 +1,60 @@
|
||||
const months = [
|
||||
{
|
||||
'name': 'Styczeń',
|
||||
'value': 'january',
|
||||
},
|
||||
{
|
||||
'name': 'Luty',
|
||||
'value': 'february',
|
||||
},
|
||||
{
|
||||
'name': 'Marzec',
|
||||
'value': 'march',
|
||||
},
|
||||
{
|
||||
'name': 'Kwiecień',
|
||||
'value': 'april',
|
||||
},
|
||||
{
|
||||
'name': 'Maj',
|
||||
'value': 'may',
|
||||
},
|
||||
{
|
||||
'name': 'Czerwiec',
|
||||
'value': 'june',
|
||||
},
|
||||
{
|
||||
'name': 'Lipiec',
|
||||
'value': 'july',
|
||||
},
|
||||
{
|
||||
'name': 'Sierpień',
|
||||
'value': 'august',
|
||||
},
|
||||
{
|
||||
'name': 'Wrzesień',
|
||||
'value': 'september',
|
||||
},
|
||||
{
|
||||
'name': 'Październik',
|
||||
'value': 'october',
|
||||
},
|
||||
{
|
||||
'name': 'Listopad',
|
||||
'value': 'november',
|
||||
},
|
||||
{
|
||||
'name': 'Grudzień',
|
||||
'value': 'december',
|
||||
},
|
||||
]
|
||||
|
||||
export function useMonthInfo() {
|
||||
const getMonths = () => months
|
||||
const findMonth = value => months.find(month => month.value === value)
|
||||
|
||||
return {
|
||||
getMonths,
|
||||
findMonth,
|
||||
}
|
||||
}
|
@@ -31,7 +31,7 @@ const statuses = [
|
||||
},
|
||||
},
|
||||
{
|
||||
text: 'Czeka na akceptację od technicznego',
|
||||
text: 'Czeka na akceptację od przełożonego technicznego',
|
||||
value: 'waiting_for_technical',
|
||||
outline: {
|
||||
icon: OutlineClockIcon,
|
||||
@@ -44,7 +44,7 @@ const statuses = [
|
||||
},
|
||||
},
|
||||
{
|
||||
text: 'Czeka na akceptację od administracyjnego',
|
||||
text: 'Czeka na akceptację od przełożonego administracyjnego',
|
||||
value: 'waiting_for_administrative',
|
||||
outline: {
|
||||
icon: OutlineClockIcon,
|
||||
|
@@ -126,6 +126,7 @@
|
||||
import {Menu, MenuButton, MenuItem, MenuItems} from '@headlessui/vue'
|
||||
import {CheckIcon, ChevronDownIcon} from '@heroicons/vue/solid'
|
||||
import {computed} from 'vue'
|
||||
import {useMonthInfo} from '@/Composables/monthInfo'
|
||||
|
||||
export default {
|
||||
name: 'VacationCalendar',
|
||||
@@ -152,58 +153,10 @@ export default {
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const months = [
|
||||
{
|
||||
'name': 'Styczeń',
|
||||
'value': 'january',
|
||||
},
|
||||
{
|
||||
'name': 'Luty',
|
||||
'value': 'february',
|
||||
},
|
||||
{
|
||||
'name': 'Marzec',
|
||||
'value': 'march',
|
||||
},
|
||||
{
|
||||
'name': 'Kwiecień',
|
||||
'value': 'april',
|
||||
},
|
||||
{
|
||||
'name': 'Maj',
|
||||
'value': 'may',
|
||||
},
|
||||
{
|
||||
'name': 'Czerwiec',
|
||||
'value': 'june',
|
||||
},
|
||||
{
|
||||
'name': 'Lipiec',
|
||||
'value': 'july',
|
||||
},
|
||||
{
|
||||
'name': 'Sierpień',
|
||||
'value': 'august',
|
||||
},
|
||||
{
|
||||
'name': 'Wrzesień',
|
||||
'value': 'september',
|
||||
},
|
||||
{
|
||||
'name': 'Październik',
|
||||
'value': 'october',
|
||||
},
|
||||
{
|
||||
'name': 'Listopad',
|
||||
'value': 'november',
|
||||
},
|
||||
{
|
||||
'name': 'Grudzień',
|
||||
'value': 'december',
|
||||
},
|
||||
]
|
||||
const {getMonths, findMonth} = useMonthInfo()
|
||||
const months = getMonths()
|
||||
|
||||
const selectedMonth = computed(() => months.find(month => month.value === props.currentMonth))
|
||||
const selectedMonth = computed(() => findMonth(props.currentMonth))
|
||||
|
||||
return {
|
||||
months,
|
||||
|
Reference in New Issue
Block a user