fix: Update Invoice schema, queries, mutations and remove ShiftDayCompletion related files
This commit is contained in:
@@ -5,6 +5,7 @@ mutation createInvoice(
|
||||
$vendorId: UUID!
|
||||
$businessId: UUID!
|
||||
$orderId: UUID!
|
||||
$shiftId: UUID
|
||||
|
||||
$paymentTerms: InovicePaymentTerms
|
||||
$invoiceNumber: String!
|
||||
@@ -31,6 +32,7 @@ mutation createInvoice(
|
||||
vendorId: $vendorId
|
||||
businessId: $businessId
|
||||
orderId: $orderId
|
||||
shiftId: $shiftId
|
||||
|
||||
paymentTerms: $paymentTerms
|
||||
invoiceNumber: $invoiceNumber
|
||||
@@ -61,6 +63,7 @@ mutation updateInvoice(
|
||||
$vendorId: UUID
|
||||
$businessId: UUID
|
||||
$orderId: UUID
|
||||
$shiftId: UUID
|
||||
|
||||
$paymentTerms: InovicePaymentTerms
|
||||
$invoiceNumber: String
|
||||
@@ -92,6 +95,7 @@ mutation updateInvoice(
|
||||
vendorId: $vendorId
|
||||
businessId: $businessId
|
||||
orderId: $orderId
|
||||
shiftId: $shiftId
|
||||
|
||||
paymentTerms: $paymentTerms
|
||||
invoiceNumber: $invoiceNumber
|
||||
@@ -121,3 +125,39 @@ mutation updateInvoice(
|
||||
mutation deleteInvoice($id: UUID!) @auth(level: USER) {
|
||||
invoice_delete(id: $id)
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# APPROVE INVOICE
|
||||
# Called by the client to approve a shift-day completion record.
|
||||
# Sets status to APPROVED, triggering the invoice-ready state.
|
||||
# ------------------------------------------------------------
|
||||
mutation approveInvoice($id: UUID!) @auth(level: USER) {
|
||||
invoice_update(
|
||||
id: $id
|
||||
data: {
|
||||
status: APPROVED
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# DISPUTE INVOICE
|
||||
# Called by the client to dispute a shift-day completion record.
|
||||
# Sets status to DISPUTED and stores the dispute details.
|
||||
# ------------------------------------------------------------
|
||||
mutation disputeInvoice(
|
||||
$id: UUID!
|
||||
$disputedItems: Any
|
||||
$disputeReason: String!
|
||||
$disputeDetails: String
|
||||
) @auth(level: USER) {
|
||||
invoice_update(
|
||||
id: $id
|
||||
data: {
|
||||
status: DISPUTED
|
||||
disputedItems: $disputedItems
|
||||
disputeReason: $disputeReason
|
||||
disputeDetails: $disputeDetails
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user