@tmlmobilidade/interfaces 20250924.1603.53 → 20250924.1708.22
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.
|
@@ -20,12 +20,23 @@ class RideAcceptanceClass extends MongoCollectionClass {
|
|
|
20
20
|
return RideAcceptanceClass._instance;
|
|
21
21
|
}
|
|
22
22
|
async createByRideId(ride_id, data) {
|
|
23
|
+
const currentTimestamp = Dates.now('utc').unix_timestamp;
|
|
24
|
+
const createdBy = data.created_by || 'system';
|
|
23
25
|
data.comments.push({
|
|
24
|
-
created_at:
|
|
25
|
-
created_by:
|
|
26
|
+
created_at: currentTimestamp,
|
|
27
|
+
created_by: createdBy,
|
|
26
28
|
message: 'Ride acceptance created',
|
|
27
29
|
type: 'note',
|
|
28
|
-
updated_at:
|
|
30
|
+
updated_at: currentTimestamp,
|
|
31
|
+
});
|
|
32
|
+
data.comments.push({
|
|
33
|
+
created_at: currentTimestamp,
|
|
34
|
+
created_by: createdBy,
|
|
35
|
+
curr_value: data.analysis_summary,
|
|
36
|
+
field: 'analysis_summary',
|
|
37
|
+
prev_value: null,
|
|
38
|
+
type: 'field_changed',
|
|
39
|
+
updated_at: currentTimestamp,
|
|
29
40
|
});
|
|
30
41
|
return super.insertOne({ ...data, ride_id });
|
|
31
42
|
}
|
package/package.json
CHANGED