mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-12-06 17:52:16 +00:00
Add invoice logo and invoice settings support
Adds the invoice logo fields to the API client and a permission helper for the invoice settings page. Points the Invoicing extension at the feature/invoice-logo branch, which must be pinned to a release tag before merging.
This commit is contained in:
committed by
Constantin Graf
parent
56973656d0
commit
84af013881
@@ -9,7 +9,7 @@
|
||||
},
|
||||
"Invoicing": {
|
||||
"repository": "solidtime-io/extension-invoicing",
|
||||
"ref": "v0.0.13"
|
||||
"ref": "v0.0.15"
|
||||
},
|
||||
"Auditing": {
|
||||
"repository": "solidtime-io/extension-auditing",
|
||||
|
||||
@@ -110,6 +110,7 @@ const InvoiceStoreRequest = z
|
||||
.object({
|
||||
due_at: z.union([z.string(), z.null()]).optional(),
|
||||
paid_date: z.union([z.string(), z.null()]).optional(),
|
||||
seller_logo: z.union([z.string(), z.null()]).optional(),
|
||||
seller_name: z.string(),
|
||||
seller_vatin: z.union([z.string(), z.null()]).optional(),
|
||||
seller_address_line_1: z.union([z.string(), z.null()]).optional(),
|
||||
@@ -177,6 +178,7 @@ const DetailedInvoiceResource = z
|
||||
seller_address_country: z.string(),
|
||||
seller_phone: z.string(),
|
||||
seller_email: z.string(),
|
||||
seller_logo_url: z.union([z.string(), z.null()]),
|
||||
recipient: InvoiceRecipientResource,
|
||||
paid_date: z.string(),
|
||||
due_at: z.string(),
|
||||
@@ -204,6 +206,7 @@ const InvoiceUpdateRequest = z
|
||||
status: InvoiceStatus,
|
||||
due_at: z.union([z.string(), z.null()]),
|
||||
paid_date: z.union([z.string(), z.null()]),
|
||||
seller_logo: z.union([z.string(), z.null()]),
|
||||
seller_name: z.string(),
|
||||
seller_vatin: z.union([z.string(), z.null()]),
|
||||
seller_address_line_1: z.union([z.string(), z.null()]),
|
||||
@@ -259,6 +262,7 @@ const InvoiceSettingResource = z
|
||||
notes_default: z.union([z.string(), z.null()]),
|
||||
tax_rate_default: z.union([z.number(), z.null()]),
|
||||
e_invoicing_enabled: z.boolean(),
|
||||
logo_url: z.union([z.string(), z.null()]),
|
||||
organization_id: z.string(),
|
||||
})
|
||||
.passthrough();
|
||||
@@ -278,6 +282,7 @@ const InvoiceSettingUpdateRequest = z
|
||||
notes_default: z.union([z.string(), z.null()]),
|
||||
tax_rate_default: z.union([z.number(), z.null()]),
|
||||
e_invoicing_enabled: z.boolean(),
|
||||
logo: z.union([z.string(), z.null()]),
|
||||
})
|
||||
.partial()
|
||||
.passthrough();
|
||||
|
||||
@@ -129,6 +129,9 @@ export function canViewAllTimeEntries() {
|
||||
export function canViewInvoices() {
|
||||
return currentUserHasPermission('invoices:view');
|
||||
}
|
||||
export function canUpdateInvoiceSettings() {
|
||||
return currentUserHasPermission('invoice-settings:update');
|
||||
}
|
||||
export function canCreateReports() {
|
||||
return currentUserHasPermission('reports:create');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user