kcommons 9.12.0 → 9.13.2

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.
@@ -33,7 +33,7 @@ export declare const PERMISSION_CONFIG: {
33
33
  ISTD: PERMISSION_ACTIONS[];
34
34
  };
35
35
  export declare const EntitySpecificDocuments: {
36
- gate: never[];
36
+ gate: DOCUMENTS[];
37
37
  office: never[];
38
38
  store_location: DOCUMENTS[];
39
39
  purchase_location: DOCUMENTS[];
@@ -85,7 +85,7 @@ exports.PERMISSION_CONFIG = {
85
85
  ],
86
86
  };
87
87
  exports.EntitySpecificDocuments = {
88
- [entityTypes_constants_1.EntityTypes.GATE]: [],
88
+ [entityTypes_constants_1.EntityTypes.GATE]: [DOCUMENTS.GRN],
89
89
  [entityTypes_constants_1.EntityTypes.OFFICE]: [],
90
90
  [entityTypes_constants_1.EntityTypes.STORE_LOCATION]: [
91
91
  DOCUMENTS.MRN,
@@ -0,0 +1 @@
1
+ export declare function padNumber(num: number | string, reqLength?: number): string;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.padNumber = padNumber;
4
+ function padNumber(num, reqLength = 6) {
5
+ if (typeof num === 'string' && isNaN(Number(num)))
6
+ return num;
7
+ const targetNum = Number(num);
8
+ return targetNum.toString().padStart(reqLength, '0');
9
+ }
package/build/index.d.ts CHANGED
@@ -69,8 +69,8 @@ export * from "./utils/parseQueryParams.util";
69
69
  export * from "./utils/getContactPerson.util";
70
70
  export * from "./utils/quote.util";
71
71
  export * from "./utils/getCompanyQuestionFormLinktoken.util";
72
+ export * from "./utils/getMediaName.util";
72
73
  export * from "./templates/notifications/rfq.notifications";
73
- export * from "./templates/notifications/po.notifications";
74
74
  export * from "./templates/notifications/quote.notifications";
75
75
  export * from "./typings/verification_apis/pincode.typings";
76
76
  export * from "./typings/verification_apis/gstVerification.typings";
@@ -82,6 +82,7 @@ export * from "./typings/vendor/companyProfile.typings";
82
82
  export * from "./typings/company/rootEntityApproval/rootEntityApprovalChain.typings";
83
83
  export * from "./typings/company/rootEntityApproval/rootEntityApprovalConfig.typings";
84
84
  export * from "./typings/company/rootEntityApproval/rootEntityApprovalEntries.typings";
85
+ export * from "./helpers/padNumber.helper";
85
86
  export interface ITesting {
86
87
  message: string;
87
88
  age: number;
package/build/index.js CHANGED
@@ -89,9 +89,9 @@ __exportStar(require("./utils/parseQueryParams.util"), exports);
89
89
  __exportStar(require("./utils/getContactPerson.util"), exports);
90
90
  __exportStar(require("./utils/quote.util"), exports);
91
91
  __exportStar(require("./utils/getCompanyQuestionFormLinktoken.util"), exports);
92
+ __exportStar(require("./utils/getMediaName.util"), exports);
92
93
  // Templates
93
94
  __exportStar(require("./templates/notifications/rfq.notifications"), exports);
94
- __exportStar(require("./templates/notifications/po.notifications"), exports);
95
95
  __exportStar(require("./templates/notifications/quote.notifications"), exports);
96
96
  // Verification APIs
97
97
  __exportStar(require("./typings/verification_apis/pincode.typings"), exports);
@@ -108,3 +108,5 @@ __exportStar(require("./typings/vendor/companyProfile.typings"), exports);
108
108
  __exportStar(require("./typings/company/rootEntityApproval/rootEntityApprovalChain.typings"), exports);
109
109
  __exportStar(require("./typings/company/rootEntityApproval/rootEntityApprovalConfig.typings"), exports);
110
110
  __exportStar(require("./typings/company/rootEntityApproval/rootEntityApprovalEntries.typings"), exports);
111
+ // Helpers
112
+ __exportStar(require("./helpers/padNumber.helper"), exports);
@@ -43,6 +43,11 @@ export interface IASN {
43
43
  cancelled_by_entity: ASN_CANCELLED_BY_ENTITY | null;
44
44
  cancellation_remark: string | null;
45
45
  cancelled_by_user_id: string | null;
46
+ remarks: string | null;
47
+ eway_bill: string | null;
48
+ mode_of_transport: string | null;
49
+ tracking_no: string | null;
50
+ vehicle_no: string | null;
46
51
  is_deleted: boolean;
47
52
  deleted_at: string;
48
53
  cancelled_at: string | null;
@@ -61,6 +61,7 @@ export interface IPurchaseOrder {
61
61
  contact_person_id: string | null;
62
62
  external_contact_person_id: string | null;
63
63
  status: string;
64
+ invoices: string[];
64
65
  total: number | null;
65
66
  subtotal: number | null;
66
67
  sent_for_approval_by_id: string | null;
@@ -0,0 +1 @@
1
+ export declare function getMediaNameFromLink(link?: string | null): string | null;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMediaNameFromLink = getMediaNameFromLink;
4
+ function getMediaNameFromLink(link) {
5
+ if (!link)
6
+ return null;
7
+ const linkBase = link === null || link === void 0 ? void 0 : link.split("?")[0];
8
+ const mediaName = linkBase === null || linkBase === void 0 ? void 0 : linkBase.split("/").pop();
9
+ return mediaName || null;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "9.12.0",
3
+ "version": "9.13.2",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",