kcommons 5.17.13 → 5.18.0

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.
@@ -0,0 +1,24 @@
1
+ export declare const navRoutes: {
2
+ auth: {
3
+ login: string;
4
+ };
5
+ purchase: {
6
+ quotes: {
7
+ list: string;
8
+ add: string;
9
+ view: (quote_id: string) => string;
10
+ edit: (quote_id: string) => string;
11
+ };
12
+ po: {
13
+ add: string;
14
+ list: string;
15
+ view: (po_id: string) => string;
16
+ };
17
+ asn: {
18
+ add: string;
19
+ list: string;
20
+ edit: (asn_id: string) => string;
21
+ view: (asn_id: string) => string;
22
+ };
23
+ };
24
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.navRoutes = void 0;
4
+ exports.navRoutes = {
5
+ auth: {
6
+ login: "/login",
7
+ },
8
+ purchase: {
9
+ quotes: {
10
+ list: "/purchase/quotes",
11
+ add: "/purchase/quotes/add",
12
+ view: (quote_id) => `/purchase/quotes/${quote_id}/view`,
13
+ edit: (quote_id) => `/purchase/quotes/${quote_id}/edit`,
14
+ },
15
+ po: {
16
+ add: `/purchase/pos/add`,
17
+ list: `/purchase/pos/`,
18
+ view: (po_id) => `/purchase/pos/${po_id}/view`,
19
+ },
20
+ asn: {
21
+ add: `/purchase/asn/add`,
22
+ list: `/purchase/asn`,
23
+ edit: (asn_id) => `/purchase/asn/${asn_id}/edit`,
24
+ view: (asn_id) => `/purchase/asn/${asn_id}/view`,
25
+ },
26
+ },
27
+ };
@@ -1,10 +1,6 @@
1
1
  import { INotificationTemplate } from "../../typings/notifications.typings";
2
- export declare enum RFQ_NOTIFICATION_EVENTS {
3
- chanceForApproval = "chanceForApproval"
4
- }
5
2
  export declare const RFQ_NOTIFICATION_TEMPLATES: {
6
- chanceForApproval: ({ rfq_id, rfq_no, }: {
7
- rfq_id: string;
8
- rfq_no: string;
9
- }) => INotificationTemplate;
3
+ rfqApproved: (rfq_id: string, rfq_no: string) => INotificationTemplate;
4
+ chanceForApproval: (rfq_id: string, rfq_no: string) => INotificationTemplate;
5
+ rfqRejection: (rfq_id: string, rfq_no: string, rejectedBy: string) => INotificationTemplate;
10
6
  };
@@ -1,17 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RFQ_NOTIFICATION_TEMPLATES = exports.RFQ_NOTIFICATION_EVENTS = void 0;
3
+ exports.RFQ_NOTIFICATION_TEMPLATES = void 0;
4
4
  const companyRoutes_constants_1 = require("../../constants/companyRoutes.constants");
5
- var RFQ_NOTIFICATION_EVENTS;
6
- (function (RFQ_NOTIFICATION_EVENTS) {
7
- RFQ_NOTIFICATION_EVENTS["chanceForApproval"] = "chanceForApproval";
8
- })(RFQ_NOTIFICATION_EVENTS || (exports.RFQ_NOTIFICATION_EVENTS = RFQ_NOTIFICATION_EVENTS = {}));
9
5
  exports.RFQ_NOTIFICATION_TEMPLATES = {
10
- [RFQ_NOTIFICATION_EVENTS.chanceForApproval]: ({ rfq_id, rfq_no, }) => {
6
+ rfqApproved: (rfq_id, rfq_no) => {
7
+ return {
8
+ action_link: companyRoutes_constants_1.companyNavConfig.purchase.rfq.view(rfq_id),
9
+ description: `RFQ ${rfq_no} has been approved and is ready to send to vendors`,
10
+ title: "RFQ Send to Vendor",
11
+ };
12
+ },
13
+ chanceForApproval: (rfq_id, rfq_no) => {
11
14
  return {
12
15
  action_link: companyRoutes_constants_1.companyNavConfig.purchase.rfq.view(rfq_id),
13
16
  description: `Please approve the RFQ ${rfq_no}`,
14
- title: "RFQ Approval",
17
+ title: `RFQ ${rfq_no} approval`,
18
+ };
19
+ },
20
+ rfqRejection: (rfq_id, rfq_no, rejectedBy) => {
21
+ return {
22
+ action_link: companyRoutes_constants_1.companyNavConfig.purchase.rfq.view(rfq_id),
23
+ description: `RFQ ${rfq_no} has been rejeted by ${rejectedBy}.`,
24
+ title: `RFQ ${rfq_no} rejected`,
15
25
  };
16
26
  },
17
27
  };
@@ -52,5 +52,5 @@ export declare enum VENDOR_INCLUDE {
52
52
  vendor_notifications = "vendor_notifications"
53
53
  }
54
54
  export interface IVENDOR_TOKEN_PAYLOAD {
55
- vendor_id: string;
55
+ id: string;
56
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "5.17.13",
3
+ "version": "5.18.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.js",