@duvdu-v1/duvdu 1.1.352 → 1.1.354
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.
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// disable eslint for this file
|
|
3
|
+
/* eslint-disable */
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
5
|
exports.ProjectContract = exports.ProjectContractStatus = void 0;
|
|
4
6
|
const mongoose_1 = require("mongoose");
|
|
@@ -20,7 +22,7 @@ const generateTicketNumber = () => {
|
|
|
20
22
|
const random = Math.floor(100000 + Math.random() * 900000); // 6-digit random number
|
|
21
23
|
return `PRJC${random}`;
|
|
22
24
|
};
|
|
23
|
-
|
|
25
|
+
const projectContractSchema = new mongoose_1.Schema({
|
|
24
26
|
sp: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
|
|
25
27
|
ticketNumber: { type: String, default: generateTicketNumber, unique: true, sparse: true },
|
|
26
28
|
customer: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
|
|
@@ -60,6 +62,7 @@ exports.ProjectContract = (0, mongoose_1.model)(model_names_1.MODELS.projectCont
|
|
|
60
62
|
secondPaymentAmount: { type: Number, default: 0 },
|
|
61
63
|
status: { type: String, enum: ProjectContractStatus },
|
|
62
64
|
rejectedBy: { type: String, enum: ['sp', 'customer'], default: null },
|
|
65
|
+
canceledBy: { type: String, enum: ['sp', 'customer', 'system'], default: null },
|
|
63
66
|
paymentLink: String,
|
|
64
67
|
duration: { type: Number, default: 0 },
|
|
65
68
|
equipmentPrice: { type: Number, default: 0 },
|
|
@@ -81,5 +84,5 @@ exports.ProjectContract = (0, mongoose_1.model)(model_names_1.MODELS.projectCont
|
|
|
81
84
|
},
|
|
82
85
|
user: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user, default: null },
|
|
83
86
|
},
|
|
84
|
-
}, { timestamps: true, collection: model_names_1.MODELS.projectContract })
|
|
85
|
-
|
|
87
|
+
}, { timestamps: true, collection: model_names_1.MODELS.projectContract });
|
|
88
|
+
exports.ProjectContract = (0, mongoose_1.model)(model_names_1.MODELS.projectContract, projectContractSchema);
|
|
@@ -441,7 +441,7 @@ class PaymobPaymentProcessor {
|
|
|
441
441
|
* @private
|
|
442
442
|
*/
|
|
443
443
|
buildIntentionRequest(amount, billingData, items, currency, extras) {
|
|
444
|
-
const amountInCents = amount * 100;
|
|
444
|
+
const amountInCents = Number((amount * 100).toFixed(2));
|
|
445
445
|
return {
|
|
446
446
|
amount: amountInCents,
|
|
447
447
|
currency,
|