tripstorekrabi-shared 1.7.1 → 1.7.2
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.
- package/package.json +2 -2
- package/utils.js +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tripstorekrabi-shared",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Shared library for Trip Store Krabi",
|
|
5
|
-
"author": "Stefan Sommer",
|
|
5
|
+
"author": "Stefan Sommer <tonprince@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/tonprince/tripstorekrabi.git"
|
package/utils.js
CHANGED
|
@@ -461,7 +461,7 @@ function checkTime(pickupTimeValue, departureTimeValue, context) {
|
|
|
461
461
|
let departureTimeValues = departureTimeValue.split(":");
|
|
462
462
|
let departureTime = dayjs().hour(departureTimeValues[0]).minute(departureTimeValues[1]).second(0);
|
|
463
463
|
|
|
464
|
-
return pickupTime.isSameOrBefore(departureTime) ? true : context.createError({ message: "Pickup time must be before or equals departure time", path: context.path, });
|
|
464
|
+
return pickupTime.isSameOrBefore(departureTime) ? true : context.createError({ message: "Pickup time must be before or equals departure time", path: context.path, params: { status: "warning" } });
|
|
465
465
|
} catch (e) {
|
|
466
466
|
return false;
|
|
467
467
|
}
|