refactor: add remark

This commit is contained in:
Thanaphon Frappet 2025-01-23 14:54:09 +07:00
parent 5c9c035d2b
commit 03e99c0f0c
5 changed files with 30 additions and 7 deletions

View file

@ -104,6 +104,10 @@ export const useTaskOrderStore = defineStore('taskorder-store', () => {
async function editTaskOrder(body: TaskOrderPayload) {
const res = await api.put<TaskOrder>(`/task-order/${body.id}`, {
taskProduct: body.taskProduct?.map((v) => ({
productId: v.productId,
discount: v.discount,
})),
taskList: body.taskList.map((v) => ({
step: v.step,
requestWorkId: v.requestWorkId,
@ -113,7 +117,7 @@ export const useTaskOrderStore = defineStore('taskorder-store', () => {
contactName: body.contactName,
taskStatus: body.taskStatus,
taskName: body.taskName,
taskProduct: body.taskProduct,
remark: body.remark,
});
if (res.status < 400) {

View file

@ -56,6 +56,7 @@ export interface TaskOrder {
code: string;
id: string;
userTask: UserTask[];
remark?: string;
}
export interface UserTask {
@ -176,6 +177,7 @@ export interface TaskOrderPayload {
registeredBranchId?: string;
id?: string;
code?: string;
remark?: string;
}
export interface ProductService {