procbay-schema 1.0.78 → 1.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/prisma/json/content-data/dynamic-form.json +18 -15
- package/prisma/json/core-data/permissions/strategy.json +58 -0
- package/prisma/json/core-data/user-event-configuration.json +4 -0
- package/prisma/migrations/20251210115800_added_slug_in_strategy_table/migration.sql +11 -0
- package/prisma/migrations/20251211055141_added_description_in_user_event_config_and_dynamic_form_tables/migration.sql +5 -0
- package/prisma/schema.prisma +3 -0
- package/prisma/seeders/dynamic-form.seed.js +2 -0
- package/prisma/seeders/user-event-configuration.seed.js +2 -1
- package/src/prisma/edge.js +6 -3
- package/src/prisma/index-browser.js +3 -0
- package/src/prisma/index.d.ts +108 -4
- package/src/prisma/index.js +6 -3
- package/src/prisma/package.json +1 -1
- package/src/prisma/schema.prisma +20 -17
- package/src/prisma/wasm.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "procbay-schema",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"description": "A set of utilities for managing Prisma database schemas, seeding, and maintenance operations for the Procure-to-Pay system",
|
|
5
5
|
"main": "src/prisma/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"slug": "basic_company_information",
|
|
15
15
|
"order": 0,
|
|
16
16
|
"title": "Basic Company Information",
|
|
17
|
+
"description": "Basic Company Information",
|
|
17
18
|
"fields": [
|
|
18
19
|
{
|
|
19
20
|
"id": "company_name",
|
|
@@ -199,14 +200,14 @@
|
|
|
199
200
|
},
|
|
200
201
|
"placeholder": "Subsidiaries"
|
|
201
202
|
}
|
|
202
|
-
]
|
|
203
|
-
"description": "Basic Company Information"
|
|
203
|
+
]
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
"id": "section-1764657765183",
|
|
207
207
|
"slug": "product_and_service_information",
|
|
208
208
|
"order": 1,
|
|
209
209
|
"title": "Product and Service Information",
|
|
210
|
+
"description": "Product and Service Information",
|
|
210
211
|
"fields": [
|
|
211
212
|
{
|
|
212
213
|
"id": "sku_details",
|
|
@@ -362,14 +363,14 @@
|
|
|
362
363
|
},
|
|
363
364
|
"placeholder": "Customizable Products/Services"
|
|
364
365
|
}
|
|
365
|
-
]
|
|
366
|
-
"description": "Product and Service Information"
|
|
366
|
+
]
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
369
|
"id": "section-1764657765184",
|
|
370
370
|
"slug": "legal_information",
|
|
371
371
|
"order": 2,
|
|
372
372
|
"title": "Legal Information",
|
|
373
|
+
"description": "Legal Information",
|
|
373
374
|
"fields": [
|
|
374
375
|
{
|
|
375
376
|
"type": "inputField",
|
|
@@ -495,8 +496,7 @@
|
|
|
495
496
|
"required": true,
|
|
496
497
|
"placeholder": "Business Registration Documents"
|
|
497
498
|
}
|
|
498
|
-
]
|
|
499
|
-
"description": "Legal Information"
|
|
499
|
+
]
|
|
500
500
|
},
|
|
501
501
|
{
|
|
502
502
|
"id": "section-1764657765185",
|
|
@@ -1015,6 +1015,7 @@
|
|
|
1015
1015
|
"slug": "requestor_details",
|
|
1016
1016
|
"order": 0,
|
|
1017
1017
|
"title": "Requestor Details",
|
|
1018
|
+
"description": "Requestor Details",
|
|
1018
1019
|
"fields": [
|
|
1019
1020
|
{
|
|
1020
1021
|
"id": "requestor_id",
|
|
@@ -1107,14 +1108,14 @@
|
|
|
1107
1108
|
},
|
|
1108
1109
|
"placeholder": "Request Date"
|
|
1109
1110
|
}
|
|
1110
|
-
]
|
|
1111
|
-
"description": "Requestor Details"
|
|
1111
|
+
]
|
|
1112
1112
|
},
|
|
1113
1113
|
{
|
|
1114
1114
|
"id": "section-1764657766001",
|
|
1115
1115
|
"slug": "purchase_details",
|
|
1116
1116
|
"order": 1,
|
|
1117
1117
|
"title": "Purchase Details",
|
|
1118
|
+
"description": "Purchase Details",
|
|
1118
1119
|
"fields": [
|
|
1119
1120
|
{
|
|
1120
1121
|
"id": "purchase_type",
|
|
@@ -1274,14 +1275,14 @@
|
|
|
1274
1275
|
},
|
|
1275
1276
|
"placeholder": "Search Items in the table"
|
|
1276
1277
|
}
|
|
1277
|
-
]
|
|
1278
|
-
"description": "Purchase Details"
|
|
1278
|
+
]
|
|
1279
1279
|
},
|
|
1280
1280
|
{
|
|
1281
1281
|
"id": "section-1764657766002",
|
|
1282
1282
|
"slug": "vendor_information",
|
|
1283
1283
|
"order": 2,
|
|
1284
1284
|
"title": "Vendor Information",
|
|
1285
|
+
"description": "Vendor Information",
|
|
1285
1286
|
"fields": [
|
|
1286
1287
|
{
|
|
1287
1288
|
"id": "preferred_vendors",
|
|
@@ -1354,14 +1355,14 @@
|
|
|
1354
1355
|
},
|
|
1355
1356
|
"placeholder": "If Yes, attach quotations"
|
|
1356
1357
|
}
|
|
1357
|
-
]
|
|
1358
|
-
"description": "Vendor Information"
|
|
1358
|
+
]
|
|
1359
1359
|
},
|
|
1360
1360
|
{
|
|
1361
1361
|
"id": "section-1764657766003",
|
|
1362
1362
|
"slug": "supporting_documents",
|
|
1363
1363
|
"order": 3,
|
|
1364
1364
|
"title": "Supporting Documents",
|
|
1365
|
+
"description": "Supporting Documents",
|
|
1365
1366
|
"fields": [
|
|
1366
1367
|
{
|
|
1367
1368
|
"id": "attachments",
|
|
@@ -1394,8 +1395,7 @@
|
|
|
1394
1395
|
},
|
|
1395
1396
|
"placeholder": "Internal References"
|
|
1396
1397
|
}
|
|
1397
|
-
]
|
|
1398
|
-
"description": "Supporting Documents"
|
|
1398
|
+
]
|
|
1399
1399
|
}
|
|
1400
1400
|
]
|
|
1401
1401
|
}
|
|
@@ -1411,6 +1411,7 @@
|
|
|
1411
1411
|
{
|
|
1412
1412
|
"form_name": "Basic Details",
|
|
1413
1413
|
"form_slug": "basic_details",
|
|
1414
|
+
"description": "Basic Details",
|
|
1414
1415
|
"form_order": 1,
|
|
1415
1416
|
"fields": [
|
|
1416
1417
|
{
|
|
@@ -1434,6 +1435,7 @@
|
|
|
1434
1435
|
{
|
|
1435
1436
|
"form_name": "Company Details",
|
|
1436
1437
|
"form_slug": "company_details",
|
|
1438
|
+
"description": "Company Details",
|
|
1437
1439
|
"form_order": 2,
|
|
1438
1440
|
"fields": [
|
|
1439
1441
|
{
|
|
@@ -1457,6 +1459,7 @@
|
|
|
1457
1459
|
{
|
|
1458
1460
|
"form_name": "Implemantation Details",
|
|
1459
1461
|
"form_slug": "implemantation_details",
|
|
1462
|
+
"description": "Implemantation Details",
|
|
1460
1463
|
"form_order": 3,
|
|
1461
1464
|
"fields": [
|
|
1462
1465
|
{
|
|
@@ -1515,4 +1518,4 @@
|
|
|
1515
1518
|
}
|
|
1516
1519
|
]
|
|
1517
1520
|
}
|
|
1518
|
-
]
|
|
1521
|
+
]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"permissions_name": "List Strategy",
|
|
4
|
+
"slug": "list_strategy",
|
|
5
|
+
"description": "This permission allows logged-in users to view the strategy list",
|
|
6
|
+
"model": "strategy",
|
|
7
|
+
"is_active": true,
|
|
8
|
+
"created_by": 1
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"permissions_name": "Add Strategy",
|
|
12
|
+
"slug": "add_strategy",
|
|
13
|
+
"description": "This permission allows logged-in users to add a new strategy",
|
|
14
|
+
"model": "strategy",
|
|
15
|
+
"is_active": true,
|
|
16
|
+
"created_by": 1
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"permissions_name": "Update Strategy",
|
|
20
|
+
"slug": "update_strategy",
|
|
21
|
+
"description": "This permission allows logged-in users to update an existing strategy",
|
|
22
|
+
"model": "strategy",
|
|
23
|
+
"is_active": true,
|
|
24
|
+
"created_by": 1
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"permissions_name": "Delete Strategy",
|
|
28
|
+
"slug": "delete_strategy",
|
|
29
|
+
"description": "This permission allows logged-in users to delete an existing strategy",
|
|
30
|
+
"model": "strategy",
|
|
31
|
+
"is_active": true,
|
|
32
|
+
"created_by": 1
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"permissions_name": "Toggle Strategy Status",
|
|
36
|
+
"slug": "toggle_strategy_status",
|
|
37
|
+
"description": "This permission allows logged-in users to set the strategy status as active or inactive",
|
|
38
|
+
"model": "strategy",
|
|
39
|
+
"is_active": true,
|
|
40
|
+
"created_by": 1
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"permissions_name": "Import Strategy Excel",
|
|
44
|
+
"slug": "import_strategy",
|
|
45
|
+
"description": "This permission allows logged-in users to import strategy data from an Excel file",
|
|
46
|
+
"model": "strategy",
|
|
47
|
+
"is_active": true,
|
|
48
|
+
"created_by": 1
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"permissions_name": "Restore Strategy",
|
|
52
|
+
"slug": "restore_strategy",
|
|
53
|
+
"description": "This permission allows logged-in users to restore deleted strategy",
|
|
54
|
+
"model": "strategy",
|
|
55
|
+
"is_active": true,
|
|
56
|
+
"created_by": 1
|
|
57
|
+
}
|
|
58
|
+
]
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"id": 1,
|
|
4
4
|
"name": "Close order in evaluation time",
|
|
5
5
|
"slug": "close-order-in-evaluation-time",
|
|
6
|
+
"description": "When turned on, the order will be closed immediately after the evaluation time expires",
|
|
6
7
|
"is_active": true,
|
|
7
8
|
"is_editable": false,
|
|
8
9
|
"created_by": 1
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"id": 2,
|
|
12
13
|
"name": "Event level vendor bid masking",
|
|
13
14
|
"slug": "event-level-vendor-bid-masking",
|
|
15
|
+
"description": "Turn this on to hide vendor bid details until the event closes",
|
|
14
16
|
"is_active": true,
|
|
15
17
|
"is_editable": true,
|
|
16
18
|
"created_by": 1
|
|
@@ -19,6 +21,7 @@
|
|
|
19
21
|
"id": 3,
|
|
20
22
|
"name": "Event level vendor name masking",
|
|
21
23
|
"slug": "event-level-vendor-name-masking",
|
|
24
|
+
"description": "Turn this on to hide vendor names until the event is complete",
|
|
22
25
|
"is_active": false,
|
|
23
26
|
"is_editable": true,
|
|
24
27
|
"created_by": 1
|
|
@@ -27,6 +30,7 @@
|
|
|
27
30
|
"id": 4,
|
|
28
31
|
"name": "Event extension options",
|
|
29
32
|
"slug": "event-extension-options",
|
|
33
|
+
"description": "Turn this on to allow extending event timelines when needed",
|
|
30
34
|
"is_active": false,
|
|
31
35
|
"is_editable": true,
|
|
32
36
|
"created_by": 1
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- A unique constraint covering the columns `[slug]` on the table `strategies` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "strategies" ADD COLUMN "slug" TEXT;
|
|
9
|
+
|
|
10
|
+
-- CreateIndex
|
|
11
|
+
CREATE UNIQUE INDEX "strategies_slug_key" ON "strategies"("slug");
|
package/prisma/schema.prisma
CHANGED
|
@@ -1306,6 +1306,7 @@ model Strategies {
|
|
|
1306
1306
|
id Int @id @default(autoincrement())
|
|
1307
1307
|
uuid String? @unique @default(uuid())
|
|
1308
1308
|
name String? @unique
|
|
1309
|
+
slug String? @unique
|
|
1309
1310
|
description String?
|
|
1310
1311
|
is_active Boolean? @default(false)
|
|
1311
1312
|
created_at DateTime? @default(now()) @db.Timestamptz(6)
|
|
@@ -1761,6 +1762,7 @@ model DynamicForm {
|
|
|
1761
1762
|
module FormMaster? @relation(fields: [module_id], references: [id], onDelete: Cascade)
|
|
1762
1763
|
form_name String?
|
|
1763
1764
|
form_slug String?
|
|
1765
|
+
description String?
|
|
1764
1766
|
fields Json?
|
|
1765
1767
|
form_order Int?
|
|
1766
1768
|
is_active Boolean? @default(true)
|
|
@@ -2304,6 +2306,7 @@ model UserEventConfiguration {
|
|
|
2304
2306
|
uuid String? @unique @default(uuid())
|
|
2305
2307
|
name String?
|
|
2306
2308
|
slug String? @unique
|
|
2309
|
+
description String?
|
|
2307
2310
|
is_active Boolean @default(false)
|
|
2308
2311
|
is_editable Boolean @default(false)
|
|
2309
2312
|
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
@@ -84,6 +84,7 @@ export async function seedDynamicForm(prismaClient, seederManager = null) {
|
|
|
84
84
|
module_id: moduleRecord.id,
|
|
85
85
|
form_name: moduleRecord.module_name,
|
|
86
86
|
form_slug: moduleRecord.module_slug,
|
|
87
|
+
description: form.description,
|
|
87
88
|
form_order: form.form_order,
|
|
88
89
|
fields: form.sections,
|
|
89
90
|
is_active: formModule.is_active ?? true,
|
|
@@ -100,6 +101,7 @@ export async function seedDynamicForm(prismaClient, seederManager = null) {
|
|
|
100
101
|
where: { id: existingForm.id },
|
|
101
102
|
data: {
|
|
102
103
|
form_name: moduleRecord.module_name,
|
|
104
|
+
description: form.description,
|
|
103
105
|
form_order: form.form_order,
|
|
104
106
|
fields: form.sections,
|
|
105
107
|
is_active: formModule.is_active ?? true,
|
|
@@ -21,10 +21,11 @@ export const seedUserEventConfigurations = async (
|
|
|
21
21
|
{
|
|
22
22
|
model: "userEventConfiguration",
|
|
23
23
|
whereField: "slug",
|
|
24
|
-
updateFields: ["name", "is_active", "is_editable", "created_by"],
|
|
24
|
+
updateFields: ["name", "description", "is_active", "is_editable", "created_by"],
|
|
25
25
|
createFields: [
|
|
26
26
|
"name",
|
|
27
27
|
"slug",
|
|
28
|
+
"description",
|
|
28
29
|
"is_active",
|
|
29
30
|
"is_editable",
|
|
30
31
|
"created_by",
|