mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix(freight-permissions): split company stamp from per-officer teeter permission
This commit is contained in:
@@ -796,7 +796,7 @@ const App = () => {
|
||||
path="stamp-settings"
|
||||
element={
|
||||
<RequirePermission
|
||||
permission={FREIGHT_PERMS.settings.invoiceStamp.view}
|
||||
permission={FREIGHT_PERMS.settings.stamp.view}
|
||||
>
|
||||
<CompanyStampSettingsPage />
|
||||
</RequirePermission>
|
||||
|
||||
@@ -493,7 +493,7 @@ export const buildSidebarSections = (demoItems: SidebarItem[]): SidebarSection[]
|
||||
label: "Company stamp",
|
||||
href: "/dashboard/stamp-settings",
|
||||
icon: <Stamp />,
|
||||
permission: FREIGHT_PERMS.settings.invoiceStamp.view,
|
||||
permission: FREIGHT_PERMS.settings.stamp.view,
|
||||
},
|
||||
{
|
||||
label: "Contract templates",
|
||||
|
||||
@@ -328,15 +328,18 @@ export const FREIGHT_PERMS = {
|
||||
view: "edr_freight_app:settings:dropdown:view",
|
||||
manage: "edr_freight_app:settings:dropdown:manage",
|
||||
},
|
||||
// The ONE company stamp/seal, applied to every generated document
|
||||
// (invoices, receipts, warehouse papers, the EDR side of contracts).
|
||||
stamp: {
|
||||
view: "edr_freight_app:settings:stamp:view",
|
||||
manage: "edr_freight_app:settings:stamp:manage",
|
||||
},
|
||||
// Company stamp/seal image stamped onto invoice/receipt PDFs — separate
|
||||
// from `stamp` above, which is the per-employee approval-record teeter.
|
||||
invoiceStamp: {
|
||||
view: "edr_freight_app:settings:invoice_stamp:view",
|
||||
manage: "edr_freight_app:settings:invoice_stamp:manage",
|
||||
// The per-officer approval teeter (ማህተም) + signature — genuinely per-person,
|
||||
// and NOT the company seal above. Retired: `invoiceStamp`, which used to
|
||||
// gate the company stamp before the two were untangled.
|
||||
teeter: {
|
||||
view: "edr_freight_app:settings:teeter:view",
|
||||
manage: "edr_freight_app:settings:teeter:manage",
|
||||
},
|
||||
exchangeRate: {
|
||||
view: "edr_freight_app:settings:exchange_rate:view",
|
||||
|
||||
@@ -147,13 +147,17 @@ export function UserManagementRoutes(): ReactElement {
|
||||
(am/en) and genuinely per-person. It used to sit at
|
||||
/dashboard/stamp-settings under Settings, next to the
|
||||
single global company stamp, which read as duplication.
|
||||
Permission gate unchanged from that route.
|
||||
|
||||
Gated by settings:teeter:*, split out of settings:stamp:*
|
||||
when the two were untangled — settings:stamp:* now means
|
||||
the company stamp, so anyone who held it for the teeter
|
||||
needs the new key granted.
|
||||
*/}
|
||||
<Route
|
||||
path="user-management/teeter-and-signature"
|
||||
element={
|
||||
<RequirePermission
|
||||
permission={FREIGHT_PERMS.settings.stamp.view}
|
||||
permission={FREIGHT_PERMS.settings.teeter.view}
|
||||
>
|
||||
<UploadTeeterAndSignature />
|
||||
</RequirePermission>
|
||||
|
||||
Reference in New Issue
Block a user