@kipicore/dbcore 1.1.605 → 1.1.606

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.
@@ -1507,7 +1507,8 @@ export declare enum RMS_APPROVAL_STATUS {
1507
1507
  APPROVED = "APPROVED",
1508
1508
  REJECTED = "REJECTED",
1509
1509
  CANCELLED = "CANCELLED",
1510
- PO_CREATED = "PO_CREATED"
1510
+ PO_CREATED = "PO_CREATED",
1511
+ GRN_CREATED = "GRN_CREATED"
1511
1512
  }
1512
1513
  export declare enum RMS_PRIORITY {
1513
1514
  LOW = "LOW",
@@ -1818,6 +1818,7 @@ var RMS_APPROVAL_STATUS;
1818
1818
  RMS_APPROVAL_STATUS["REJECTED"] = "REJECTED";
1819
1819
  RMS_APPROVAL_STATUS["CANCELLED"] = "CANCELLED";
1820
1820
  RMS_APPROVAL_STATUS["PO_CREATED"] = "PO_CREATED";
1821
+ RMS_APPROVAL_STATUS["GRN_CREATED"] = "GRN_CREATED";
1821
1822
  })(RMS_APPROVAL_STATUS || (exports.RMS_APPROVAL_STATUS = RMS_APPROVAL_STATUS = {}));
1822
1823
  var RMS_PRIORITY;
1823
1824
  (function (RMS_PRIORITY) {
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+ module.exports = {
3
+ up: async (queryInterface, Sequelize) => {
4
+ const tableInfo = await queryInterface.describeTable('rms_purchase_orders');
5
+ if (!tableInfo['remarks']) {
6
+ await queryInterface.addColumn('rms_purchase_orders', 'remarks', {
7
+ type: Sequelize.TEXT,
8
+ allowNull: true,
9
+ });
10
+ }
11
+ if (!tableInfo['approval_remarks']) {
12
+ await queryInterface.addColumn('rms_purchase_orders', 'approval_remarks', {
13
+ type: Sequelize.TEXT,
14
+ allowNull: true,
15
+ });
16
+ }
17
+ },
18
+ down: async (queryInterface, Sequelize) => {
19
+ await queryInterface.removeColumn('rms_purchase_orders', 'remarks');
20
+ await queryInterface.removeColumn('rms_purchase_orders', 'approval_remarks');
21
+ }
22
+ };
@@ -13,5 +13,7 @@ export interface IRmsPurchaseOrderAttributes extends IDefaultAttributes {
13
13
  discountAmount: number;
14
14
  approvalStatus: RMS_APPROVAL_STATUS;
15
15
  fulfillmentStatus: RMS_PO_FULFILLMENT_STATUS;
16
+ approvalRemarks?: string | null;
17
+ remarks?: string | null;
16
18
  status: string;
17
19
  }
@@ -15,6 +15,8 @@ declare class RmsPurchaseOrderModel extends Model<IRmsPurchaseOrderAttributes, T
15
15
  discountAmount: number;
16
16
  approvalStatus: RMS_APPROVAL_STATUS;
17
17
  fulfillmentStatus: RMS_PO_FULFILLMENT_STATUS;
18
+ approvalRemarks?: string | null;
19
+ remarks?: string | null;
18
20
  status: string;
19
21
  createdBy?: string | null;
20
22
  updatedBy?: string | null;
@@ -104,6 +104,15 @@ RmsPurchaseOrderModel.init({
104
104
  defaultValue: app_1.RMS_PO_FULFILLMENT_STATUS.PENDING,
105
105
  field: 'fulfillment_status',
106
106
  },
107
+ approvalRemarks: {
108
+ type: sequelize_1.DataTypes.TEXT,
109
+ allowNull: true,
110
+ field: 'approval_remarks',
111
+ },
112
+ remarks: {
113
+ type: sequelize_1.DataTypes.TEXT,
114
+ allowNull: true,
115
+ },
107
116
  status: {
108
117
  type: sequelize_1.DataTypes.STRING,
109
118
  allowNull: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.605",
3
+ "version": "1.1.606",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",