refactor: add installments type to service
This commit is contained in:
parent
5b5e264c27
commit
61bade2013
4 changed files with 13 additions and 12 deletions
|
|
@ -385,9 +385,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
async function createWork(data: Partial<WorkCreate>) {
|
||||
const { ...payload } = data;
|
||||
|
||||
const res = await api.post<WorkCreate>('/work', {
|
||||
...payload,
|
||||
});
|
||||
const res = await api.post<WorkCreate>('/work', payload);
|
||||
|
||||
if (res && res.status < 400) {
|
||||
await fetchListOfWork();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export interface Service {
|
|||
createdBy: CreatedBy;
|
||||
status: Status;
|
||||
attributes: Attributes;
|
||||
installments: number;
|
||||
detail: string;
|
||||
name: string;
|
||||
code: string;
|
||||
|
|
@ -29,7 +30,6 @@ export interface Service {
|
|||
|
||||
export interface WorkCreate {
|
||||
attributes: Attributes;
|
||||
productId: string[];
|
||||
name: string;
|
||||
order: number;
|
||||
}
|
||||
|
|
@ -50,9 +50,13 @@ export interface Work {
|
|||
|
||||
export interface ServiceCreate {
|
||||
id?: string;
|
||||
installments?: number;
|
||||
work: {
|
||||
attributes: Attributes;
|
||||
productId: string[];
|
||||
product: {
|
||||
id: string;
|
||||
installmentNo?: number;
|
||||
}[];
|
||||
name: string;
|
||||
}[];
|
||||
attributes: Attributes;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue