jp-shared 1.1.4 → 1.1.6

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.
@@ -125,6 +125,18 @@ const paymentHistorySchema = new mongoose.Schema(
125
125
  message: "Discount percentage is required when isJobOffer is true",
126
126
  },
127
127
  },
128
+ gstPercentage: {
129
+ type: Number,
130
+ required: [true, "GST percentage is required"],
131
+ min: [0, "GST percentage must be a positive number"],
132
+ max: [100, "GST percentage cannot exceed 100%"],
133
+ validate: isIntegerValidator,
134
+ },
135
+ totalAmount: {
136
+ type: Number,
137
+ required: true,
138
+ min: 0, // Ensure total amount is non-negative
139
+ },
128
140
  },
129
141
  {
130
142
  timestamps: true, // Automatically manage createdAt and updatedAt
@@ -136,6 +136,19 @@ const planSchema = new mongoose.Schema({
136
136
  maxlength: [100, "Submit label cannot exceed 100 characters"],
137
137
  trim: true,
138
138
  },
139
+ gstPercentage: {
140
+ type: Number,
141
+ required: [true, "GST percentage is required"],
142
+ min: [0, "GST percentage must be a positive number"],
143
+ max: [100, "GST percentage cannot exceed 100%"],
144
+ validate: isIntegerValidator,
145
+ },
146
+ totalAmount: {
147
+ type: Number,
148
+ required: true,
149
+ min: 0, // Ensure total amount is non-negative
150
+ },
151
+
139
152
  });
140
153
 
141
154
  const myDB = mongoose.connection.useDb(getDatabaseName());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp-shared",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/utils/index.js CHANGED
@@ -8,6 +8,4 @@ module.exports = {
8
8
  ...require("./token-utils"),
9
9
  ...require("./otp-utils"),
10
10
  ...require("./populate-utils"),
11
- ...require("./sendEmailOTPReset")
12
-
13
11
  };
@@ -1,30 +0,0 @@
1
- function resetEmailOTPTemplate(fullName) {
2
- return `
3
- <!DOCTYPE html>
4
- <html lang="en">
5
- <head>
6
- <meta charset="UTF-8">
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
- <title>Verification Code</title>
9
- </head>
10
- <body style="font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f4f4f4;">
11
- <table style="max-width: 400px; margin: 10px auto; padding: 20px; background-color: #ffffff; margin-inline: auto; margin-block: 10px;">
12
- <tr>
13
- <td style="text-align: center; padding: 10px;">
14
- <h2>Ocean Academy</h2>
15
- <p>Hi ${fullName}</p>
16
- <p style="font-size: 18px;">Sorry to hear you’re having trouble logging into Ocean Academy Job Portal. We got a message that you forgot your password. If this was you, you can get right back into your account or reset your password now.</p>
17
- <a style="font-size: 22px; color: #007bff;" href="http://localhost:5173/reset-password">Change Your Password</a>
18
- <p>Now This link expires in 24 hours.</p>
19
- <p>This is a System generated mail please do not reply to this.</p>
20
- <p>© Copyright Ocean Academy 2024</p>
21
- </td>
22
- </tr>
23
-
24
- </table>
25
- </body>
26
- </html>
27
- `;
28
- }
29
-
30
- module.exports = {resetEmailOTPTemplate};