Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: don't require permissions for supplier processes api call

Brad Barbinf115155873d0
diff --git a/apps/erp/app/routes/api+/purchasing.supplier-processes.$processId.ts b/apps/erp/app/routes/api+/purchasing.supplier-processes.$processId.ts
index 9d1a80d6d9..117802844d 100644
--- a/apps/erp/app/routes/api+/purchasing.supplier-processes.$processId.ts
+++ b/apps/erp/app/routes/api+/purchasing.supplier-processes.$processId.ts
@@ -8,9 +8,7 @@ import { getSupplierProcessesByProcess } from "~/modules/purchasing";
import { supplierProcessesQuery } from "~/utils/react-query";
export async function loader({ request, params }: LoaderFunctionArgs) {
- const authorized = await requirePermissions(request, {
- view: "purchasing",
- });
+ const authorized = await requirePermissions(request, {});
const { processId } = params;
diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.ts
index d1bac142f8..0f54a0e307 100644
--- a/packages/database/src/swagger-docs-schema.ts
+++ b/packages/database/src/swagger-docs-schema.ts
@@ -6372,6 +6372,15 @@ export default {
{
$ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.quantityToIssue",
},
+ {
+ $ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.requiresSerialTracking",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.requiresBatchTracking",
+ },
+ {
+ $ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.kit",
+ },
{
$ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.jobMaterialMakeMethodId",
},
@@ -6585,6 +6594,9 @@ export default {
{
$ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
},
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.kit",
+ },
{
$ref: "#/parameters/select",
},
@@ -6704,6 +6716,9 @@ export default {
{
$ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
},
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.kit",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -6777,6 +6792,9 @@ export default {
{
$ref: "#/parameters/rowFilter.methodMaterial.productionQuantity",
},
+ {
+ $ref: "#/parameters/rowFilter.methodMaterial.kit",
+ },
{
$ref: "#/parameters/body.methodMaterial",
},
@@ -7035,6 +7053,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteMaterialWithMakeMethodId.productionQuantity",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterialWithMakeMethodId.kit",
+ },
{
$ref: "#/parameters/rowFilter.quoteMaterialWithMakeMethodId.quoteMaterialMakeMethodId",
},
@@ -21606,6 +21627,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.kit",
+ },
{
$ref: "#/parameters/select",
},
@@ -21734,6 +21758,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.kit",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -21816,6 +21843,9 @@ export default {
{
$ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity",
},
+ {
+ $ref: "#/parameters/rowFilter.quoteMaterial.kit",
+ },
{
$ref: "#/parameters/body.quoteMaterial",
},
@@ -32796,6 +32826,9 @@ export default {
{
$ref: "#/parameters/rowFilter.jobMaterial.requiresBatchTracking",
},
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.kit",
+ },
{
$ref: "#/parameters/select",
},
@@ -32936,6 +32969,9 @@ export default {
{
$ref: "#/parameters/rowFilter.jobMaterial.requiresBatchTracking",
},
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.kit",
+ },
{
$ref: "#/parameters/preferReturn",
},
@@ -33030,6 +33066,9 @@ export default {
{
$ref: "#/parameters/rowFilter.jobMaterial.requiresBatchTracking",
},
+ {
+ $ref: "#/parameters/rowFilter.jobMaterial.kit",
+ },
{
$ref: "#/parameters/body.jobMaterial",
},
@@ -51210,7 +51249,7 @@ export default {
properties: {
id: {
description:
- "Note:\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",
+ "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",
format: "text",
type: "string",
},
@@ -51259,7 +51298,7 @@ export default {
},
supplierLocationId: {
description:
- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",
+ "Note:\nThis is a Foreign Key to `supplierLocation.id`.<fk table='supplierLocation' column='id'/>",
format: "text",
type: "string",
},
@@ -51406,6 +51445,18 @@ export default {
format: "numeric",
type: "number",
},
+ requiresSerialTracking: {
+ format: "boolean",
+ type: "boolean",
+ },
+ requiresBatchTracking: {
+ format: "boolean",
+ type: "boolean",
+ },
+ kit: {
+ format: "boolean",
+ type: "boolean",
+ },
jobMaterialMakeMethodId: {
description: "Note:\nThis is a Primary Key.<pk/>",
format: "text",
@@ -51444,6 +51495,7 @@ export default {
"itemReadableId",
"order",
"scrapQuantity",
+ "kit",
],
properties: {
id: {
@@ -51550,6 +51602,11 @@ export default {
format: "numeric",
type: "number",
},
+ kit: {
+ default: false,
+ format: "boolean",
+ type: "boolean",
+ },
},
type: "object",
},
@@ -51721,6 +51778,10 @@ export default {
format: "numeric",
type: "number",
},
+ kit: {
+ format: "boolean",
+ type: "boolean",
+ },
quoteMaterialMakeMethodId: {
description: "Note:\nThis is a Primary Key.<pk/>",
format: "text",
@@ -58345,6 +58406,7 @@ export default {
"createdBy",
"quoteMakeMethodId",
"scrapQuantity",
+ "kit",
],
properties: {
id: {
@@ -58467,6 +58529,11 @@ export default {
format: "numeric",
type: "number",
},
+ kit: {
+ default: false,
+ format: "boolean",
+ type: "boolean",
+ },
},
type: "object",
},
@@ -63595,6 +63662,7 @@ export default {
"jobMakeMethodId",
"requiresSerialTracking",
"requiresBatchTracking",
+ "kit",
],
properties: {
id: {
@@ -63735,6 +63803,11 @@ export default {
format: "boolean",
type: "boolean",
},
+ kit: {
+ default: false,
+ format: "boolean",
+ type: "boolean",
+ },
},
type: "object",
},
@@ -72564,6 +72637,24 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.jobMaterialWithMakeMethodId.requiresSerialTracking": {
+ name: "requiresSerialTracking",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterialWithMakeMethodId.requiresBatchTracking": {
+ name: "requiresBatchTracking",
+ required: false,
+ in: "query",
+ type: "string",
+ },
+ "rowFilter.jobMaterialWithMakeMethodId.kit": {
+ name: "kit",
+ required: false,
+ in: "query",
+ type: "string",
+ },
"rowFilter.jobMaterialWithMakeMethodId.jobMaterialMakeMethodId": {
name: "jobMaterialMakeMethodId",
required: false,
@@ -72720,6 +72811,12 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.methodMaterial.kit": {
+ name: "kit",
+ required: false,
+ in: "query",
+ type: "string",
+ },
"body.pickMethod": {
name: "pickMethod",
description: "pickMethod",
@@ -72930,6 +73027,12 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.quoteMaterialWithMakeMethodId.kit": {
+ name: "kit",
+ required: false,
+ in: "query",
+ type: "string",
+ },
"rowFilter.quoteMaterialWithMakeMethodId.quoteMaterialMakeMethodId": {
name: "quoteMaterialMakeMethodId",
required: false,
@@ -80475,6 +80578,12 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.quoteMaterial.kit": {
+ name: "kit",
+ required: false,
+ in: "query",
+ type: "string",
+ },
"body.customerStatus": {
name: "customerStatus",
description: "customerStatus",
@@ -86496,6 +86605,12 @@ export default {
in: "query",
type: "string",
},
+ "rowFilter.jobMaterial.kit": {
+ name: "kit",
+ required: false,
+ in: "query",
+ type: "string",
+ },
"body.supplierQuoteLinePrice": {
name: "supplierQuoteLinePrice",
description: "supplierQuoteLinePrice",
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index 73eabe4085..cc20d662ba 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -8654,7 +8654,6 @@ export type Database = {
id: string
jobId: string
jobMakeMethodId: string | null
- kit: boolean
laborRate: number
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
@@ -8695,7 +8694,6 @@ export type Database = {
id?: string
jobId: string
jobMakeMethodId?: string | null
- kit?: boolean
laborRate?: number
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
@@ -8736,7 +8734,6 @@ export type Database = {
id?: string
jobId?: string
jobMakeMethodId?: string | null
- kit?: boolean
laborRate?: number
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
@@ -10896,7 +10893,6 @@ export type Database = {
customFields: Json | null
description: string
id: string
- kit: boolean
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
@@ -10926,7 +10922,6 @@ export type Database = {
customFields?: Json | null
description: string
id?: string
- kit?: boolean
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
machineTime?: number
@@ -10956,7 +10951,6 @@ export type Database = {
customFields?: Json | null
description?: string
id?: string
- kit?: boolean
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
machineTime?: number
@@ -18404,7 +18398,6 @@ export type Database = {
customFields: Json | null
description: string | null
id: string
- kit: boolean
laborRate: number
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
@@ -18439,7 +18432,6 @@ export type Database = {
customFields?: Json | null
description?: string | null
id?: string
- kit?: boolean
laborRate?: number
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
@@ -18474,7 +18466,6 @@ export type Database = {
customFields?: Json | null
description?: string | null
id?: string
- kit?: boolean
laborRate?: number
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
@@ -34073,14 +34064,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -36605,7 +36596,6 @@ export type Database = {
parentMaterialId: string
order: number
isRoot: boolean
- kit: boolean
}[]
}
get_job_methods_by_method_id: {
@@ -36628,7 +36618,6 @@ export type Database = {
parentMaterialId: string
order: number
isRoot: boolean
- kit: boolean
}[]
}
get_job_operation_by_id: {
@@ -36827,7 +36816,6 @@ export type Database = {
parentMaterialId: string
order: number
isRoot: boolean
- kit: boolean
}[]
}
get_quote_methods_by_method_id: {
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index 73eabe4085..cc20d662ba 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -8654,7 +8654,6 @@ export type Database = {
id: string
jobId: string
jobMakeMethodId: string | null
- kit: boolean
laborRate: number
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
@@ -8695,7 +8694,6 @@ export type Database = {
id?: string
jobId: string
jobMakeMethodId?: string | null
- kit?: boolean
laborRate?: number
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
@@ -8736,7 +8734,6 @@ export type Database = {
id?: string
jobId?: string
jobMakeMethodId?: string | null
- kit?: boolean
laborRate?: number
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
@@ -10896,7 +10893,6 @@ export type Database = {
customFields: Json | null
description: string
id: string
- kit: boolean
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
machineTime: number
@@ -10926,7 +10922,6 @@ export type Database = {
customFields?: Json | null
description: string
id?: string
- kit?: boolean
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
machineTime?: number
@@ -10956,7 +10951,6 @@ export type Database = {
customFields?: Json | null
description?: string
id?: string
- kit?: boolean
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
machineTime?: number
@@ -18404,7 +18398,6 @@ export type Database = {
customFields: Json | null
description: string | null
id: string
- kit: boolean
laborRate: number
laborTime: number
laborUnit: Database["public"]["Enums"]["factor"]
@@ -18439,7 +18432,6 @@ export type Database = {
customFields?: Json | null
description?: string | null
id?: string
- kit?: boolean
laborRate?: number
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
@@ -18474,7 +18466,6 @@ export type Database = {
customFields?: Json | null
description?: string | null
id?: string
- kit?: boolean
laborRate?: number
laborTime?: number
laborUnit?: Database["public"]["Enums"]["factor"]
@@ -34073,14 +34064,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -36605,7 +36596,6 @@ export type Database = {
parentMaterialId: string
order: number
isRoot: boolean
- kit: boolean
}[]
}
get_job_methods_by_method_id: {
@@ -36628,7 +36618,6 @@ export type Database = {
parentMaterialId: string
order: number
isRoot: boolean
- kit: boolean
}[]
}
get_job_operation_by_id: {
@@ -36827,7 +36816,6 @@ export type Database = {
parentMaterialId: string
order: number
isRoot: boolean
- kit: boolean
}[]
}
get_quote_methods_by_method_id: {