release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
4 changed files with 13 additions and 15 deletions
Showing only changes of commit 1316c47706 - Show all commits

View File

@ -93,7 +93,7 @@ export default defineComponent({
if (list)
list.forEach((event) => {
let day = event.start.getDay();
console.log('event', event, day, !agenda[day]);
if (!agenda[day]) {
agenda[day] = [];
}

View File

@ -16,7 +16,9 @@
<div v-for="(job, index) in event.jobs" :key="index">
<q-separator style="justify-start content-center" />
<div class="text-weight-medium q-px-xs">{{ asHour(job.start) }} - {{ asHour(job.end) }}</div>
<div class="text-weight-medium q-px-xs">
{{ asHour(job.start) }} <template v-if="job.end">- {{ asHour(job.end) }}</template>
</div>
<div class="q-px-xs">
{{ job.type.name }}
</div>
@ -68,7 +70,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { defineComponent, ref, onBeforeMount, PropType } from 'vue';
import { useRouter } from 'vue-router';
import { date, Notify } from 'quasar';
import { Notify } from 'quasar';
import { asHour } from 'src/utils/datetime';
import { useUserStore } from 'src/plugins/user/store';
import { useMainStore } from 'src/store';
@ -77,13 +79,6 @@ import { useScheduleStore } from 'src/plugins/schedule/store';
export default defineComponent({
name: 'Eventslot',
components: {},
filters: {
formatToHour: function (value: Date) {
if (value) {
return date.formatDate(value, 'HH:mm');
}
},
},
props: {
event: {
required: true,
@ -113,7 +108,6 @@ export default defineComponent({
}
function jobFull(job: FG.Job) {
console.log('jobFull', job.services.length >= job.required_services);
return job.services.length >= job.required_services;
}
@ -146,7 +140,6 @@ export default defineComponent({
userid: mainStore.currentUser.userid,
value: -1,
};
try {
await store.updateEvent(props.event.id, job.id, { user: newService });
} catch (error) {

View File

@ -8,7 +8,12 @@ interface UserService {
function fixEvent(event: FG.Event) {
event.start = new Date(event.start);
event.end = new Date(event.end);
if (event.end) event.end = new Date(event.end);
event.jobs.forEach((job) => {
job.start = new Date(job.start);
if (job.end) job.end = new Date(job.end);
});
}
export const useScheduleStore = defineStore({

View File

@ -17,6 +17,6 @@ export function formatDateTime(
return dateTimeFormat.format(date);
}
export function asHour(date: Date) {
return formatDateTime(date, false, true);
export function asHour(date?: Date) {
if (date) return formatDateTime(date, false, true);
}