shuttlepro-shared 1.2.58 → 1.2.60
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.
|
@@ -171,15 +171,17 @@ const findUserWorkspaces = async (userId) => {
|
|
|
171
171
|
})
|
|
172
172
|
.lean()
|
|
173
173
|
.exec();
|
|
174
|
-
userRoleWithWorkspaces = userRoleWithWorkspaces
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
174
|
+
userRoleWithWorkspaces = userRoleWithWorkspaces
|
|
175
|
+
?.filter((userRole) => userRole?.workspaceId)
|
|
176
|
+
?.map((ur) => {
|
|
177
|
+
return {
|
|
178
|
+
...ur?.workspaceId,
|
|
179
|
+
id: ur?.workspaceId?._id?.toString(),
|
|
180
|
+
_id: ur?.workspaceId?._id?.toString(),
|
|
181
|
+
role: ur?.roleId?.name || "",
|
|
182
|
+
permissions: ur?.roleId?.modulePermissions?.modules || [],
|
|
183
|
+
};
|
|
184
|
+
});
|
|
183
185
|
if (userRoleWithWorkspaces) {
|
|
184
186
|
await setRedisData(cacheKey, userRoleWithWorkspaces, null, 0);
|
|
185
187
|
}
|
package/config/database.js
CHANGED
package/models/Order.js
CHANGED
|
@@ -108,7 +108,11 @@ const OrderSchema = new Schema(
|
|
|
108
108
|
ivrGenerated: { type: Boolean, default: false },
|
|
109
109
|
isActivityGenerated: { type: Boolean, default: false },
|
|
110
110
|
platformFinancialStatus: { type: String, default: "pending" },
|
|
111
|
-
payment: {
|
|
111
|
+
payment: {
|
|
112
|
+
isPaid: { type: Boolean, default: false },
|
|
113
|
+
paymentDate: { type: String, default: "" },
|
|
114
|
+
paymentDetails: {},
|
|
115
|
+
},
|
|
112
116
|
credentials: {},
|
|
113
117
|
sender: { type: String, default: "" },
|
|
114
118
|
orderName: { type: String, default: "" },
|