updates
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import { CrudClient } from "../infra/crud-client"
|
||||
import type { ApiClientOptions } from "../infra/client"
|
||||
import type { ApiOperationResponse, ApiPath, ApiRequestBody, ApiResponse } from "../infra/types"
|
||||
import { ApiBaseResponse } from "../contracts/types"
|
||||
import { ApiBaseResponse } from "src/contracts/types"
|
||||
|
||||
export const JOB_CARD_ROUTES = {
|
||||
INDEX: "/api/job-cards",
|
||||
BY_ID: "/api/job-cards/{id}",
|
||||
CHANGE_DATE: "/api/job-cards/{id}/change-date",
|
||||
CHANGE_STATUS: "/api/job-cards/{id}/change-status",
|
||||
CHECK_IN: "/api/job-cards/{id}/check-in",
|
||||
DELIVERY: "/api/job-cards/{id}/delivery",
|
||||
ADD_CUSTOMER_REMARK: "/api/job-cards/{id}/add-customer-remark",
|
||||
EDIT_CUSTOMER_REMARK: "/api/job-cards/{id}/edit-customer-remark",
|
||||
DELETE_CUSTOMER_REMARK: "/api/job-cards/{id}/delete-customer-remark",
|
||||
@@ -53,6 +55,14 @@ export class JobCardsClient extends CrudClient<
|
||||
return this.post(JOB_CARD_ROUTES.CHANGE_STATUS, payload, { params: { id } })
|
||||
}
|
||||
|
||||
async checkIn(id: string, payload: ApiRequestBody<typeof JOB_CARD_ROUTES.CHECK_IN, "post">) {
|
||||
return this.post(JOB_CARD_ROUTES.CHECK_IN, payload, { params: { id } })
|
||||
}
|
||||
|
||||
async delivery(id: string, payload: ApiRequestBody<typeof JOB_CARD_ROUTES.DELIVERY, "post">) {
|
||||
return this.post(JOB_CARD_ROUTES.DELIVERY, payload, { params: { id } })
|
||||
}
|
||||
|
||||
async addCustomerRemark(id: string, payload: ApiRequestBody<typeof JOB_CARD_ROUTES.ADD_CUSTOMER_REMARK, "post">) {
|
||||
return this.post(JOB_CARD_ROUTES.ADD_CUSTOMER_REMARK, payload, { params: { id } })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user