@dynamatix/gb-schemas 0.24.2 → 0.24.4

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.
@@ -110,9 +110,10 @@ applicationSchema.virtual('ltv').get(function () {
110
110
 
111
111
  applicationSchema.virtual('submittedDateFormatted').get(function () {
112
112
  if (!this.submittedDate) return null;
113
- const day = String(this.submittedDate.getDate()).padStart(2, '0');
114
- const month = String(this.submittedDate.getMonth() + 1).padStart(2, '0');
115
- const year = this.submittedDate.getFullYear();
113
+ const date = new Date(this.submittedDate);
114
+ const day = String(date.getDate()).padStart(2, '0');
115
+ const month = String(date.getMonth() + 1).padStart(2, '0');
116
+ const year = date.getFullYear();
116
117
  return `${day}-${month}-${year}`;
117
118
  });
118
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "0.24.2",
3
+ "version": "0.24.4",
4
4
  "description": "All the schemas for gatehouse bank back-end.",
5
5
  "main": "lookup.service.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "./properties": "./properties/index.js",
29
29
  "./users": "./users/index.js",
30
30
  "./product-catalogues": "./product-catalogues/index.js",
31
- "./underwriters": "./underwriter/index.js",
31
+ "./underwriter": "./underwriter/index.js",
32
32
  "./utils": "./utils/index.js"
33
33
  }
34
34
  }
@@ -1,7 +1,5 @@
1
1
  import mongoose from "mongoose";
2
2
 
3
-
4
-
5
3
  const underwriterSchema = new mongoose.Schema({
6
4
  fullName: { type: String, required: true },
7
5
  mandateLevel: { type: Number, required: true },