refactor(timesheet): moved payload interfaces to seperate file

This commit is contained in:
Matthieu Haineault 2025-09-09 09:37:33 -04:00
parent 47c58bb391
commit 04b5778dd4
6 changed files with 17 additions and 17 deletions

View File

@ -1,7 +1,8 @@
<script setup lang="ts">
/* eslint-disable */
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<{

View File

@ -6,7 +6,7 @@ import { useTimesheetStore } from 'src/stores/timesheet-store';
import TimesheetShiftComment from '../shift/timesheet-shift-comment.vue';
import TimesheetSavePayload from './timesheet-save-payload.vue';
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();

View File

@ -2,7 +2,7 @@ import { useAuthStore } from "src/stores/auth-store";
import { useTimesheetStore } from "src/stores/timesheet-store"
import { ref } from "vue";
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 = () => {

View File

@ -4,9 +4,9 @@ import { useTimesheetApi } from '../composables/use-timesheet-api';
import { computed, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
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 { date as qdate } from 'quasar';
import { CreateShiftPayload } from '../types/timesheet-shifts-payload-interface';
const { locale } = useI18n();
const timesheet_store = useTimesheetStore();

View File

@ -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 {
date : string;
type : string;

View File

@ -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[];
}