refactor(timesheet): moved payload interfaces to seperate file
This commit is contained in:
parent
47c58bb391
commit
04b5778dd4
|
|
@ -1,7 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import type { CreateShiftPayload, Shift } from '../../types/timesheet-shift-interface';
|
import { CreateShiftPayload } from '../../types/timesheet-shifts-payload-interface';
|
||||||
|
import { Shift } from '../../types/timesheet-shift-interface';
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { useTimesheetStore } from 'src/stores/timesheet-store';
|
||||||
import TimesheetShiftComment from '../shift/timesheet-shift-comment.vue';
|
import TimesheetShiftComment from '../shift/timesheet-shift-comment.vue';
|
||||||
import TimesheetSavePayload from './timesheet-save-payload.vue';
|
import TimesheetSavePayload from './timesheet-save-payload.vue';
|
||||||
import { Shift } from '../../types/timesheet-shift-interface';
|
import { Shift } from '../../types/timesheet-shift-interface';
|
||||||
import type { CreateShiftPayload } from '../../types/timesheet-shift-interface';
|
import { CreateShiftPayload } from '../../types/timesheet-shifts-payload-interface';
|
||||||
|
|
||||||
const timesheet_store = useTimesheetStore();
|
const timesheet_store = useTimesheetStore();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { useAuthStore } from "src/stores/auth-store";
|
||||||
import { useTimesheetStore } from "src/stores/timesheet-store"
|
import { useTimesheetStore } from "src/stores/timesheet-store"
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { timesheetTempService } from "../services/timesheet-services";
|
import { timesheetTempService } from "../services/timesheet-services";
|
||||||
import type { CreateShiftPayload } from "../types/timesheet-shift-interface";
|
import { CreateShiftPayload } from "../types/timesheet-shifts-payload-interface";
|
||||||
|
|
||||||
|
|
||||||
export const useTimesheetApi = () => {
|
export const useTimesheetApi = () => {
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import { useTimesheetApi } from '../composables/use-timesheet-api';
|
||||||
import { computed, onMounted } from 'vue';
|
import { computed, onMounted } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import TimesheetShiftForm from '../components/timesheet/timesheet-shift-form.vue';
|
import TimesheetShiftForm from '../components/timesheet/timesheet-shift-form.vue';
|
||||||
import type { CreateShiftPayload } from '../types/timesheet-shift-interface';
|
|
||||||
import TimesheetNavigation from '../components/timesheet/timesheet-navigation.vue';
|
import TimesheetNavigation from '../components/timesheet/timesheet-navigation.vue';
|
||||||
import { date as qdate } from 'quasar';
|
import { date as qdate } from 'quasar';
|
||||||
|
import { CreateShiftPayload } from '../types/timesheet-shifts-payload-interface';
|
||||||
|
|
||||||
const { locale } = useI18n();
|
const { locale } = useI18n();
|
||||||
const timesheet_store = useTimesheetStore();
|
const timesheet_store = useTimesheetStore();
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,3 @@
|
||||||
export interface CreateShiftPayload {
|
|
||||||
date: string;
|
|
||||||
type: string;
|
|
||||||
start_time: string;
|
|
||||||
end_time: string;
|
|
||||||
description?: string;
|
|
||||||
is_remote?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface CreateWeekShiftPayload {
|
|
||||||
shifts: CreateShiftPayload[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Shift {
|
export interface Shift {
|
||||||
date : string;
|
date : string;
|
||||||
type : string;
|
type : string;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
export interface CreateShiftPayload {
|
||||||
|
date: string;
|
||||||
|
type: string;
|
||||||
|
start_time: string;
|
||||||
|
end_time: string;
|
||||||
|
description?: string;
|
||||||
|
is_remote?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface CreateWeekShiftPayload {
|
||||||
|
shifts: CreateShiftPayload[];
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user