@open-tender/utils 0.1.77 → 0.1.78
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.
|
@@ -72,7 +72,7 @@ export declare const adjustRequestedAt: (requestedIso: ISOString, tz: Timezone,
|
|
|
72
72
|
export declare const getFirstTime: (revenueCenter: RevenueCenter, serviceType: ServiceType, tz: Timezone) => OrderTimeWithDate | FirstTime | null;
|
|
73
73
|
export declare const makeGroupOrderTime: (revenueCenter: RevenueCenter, serviceType: ServiceType, requestedAt: RequestedAt) => GroupOrderTime | GroupOrderPrepTime | null;
|
|
74
74
|
export declare const formatTime: (time: string) => string;
|
|
75
|
-
export declare const makeGroupOrderTimeStr: (
|
|
75
|
+
export declare const makeGroupOrderTimeStr: (requestedAt: RequestedAt | null, tz: Timezone) => string | null;
|
|
76
76
|
export declare const getLastInterval: (tz: Timezone) => Date;
|
|
77
77
|
export declare const makeIntervals: (tz: Timezone) => Array<Interval & {
|
|
78
78
|
orders: Array<Partial<Order>>;
|
|
@@ -533,10 +533,10 @@ const formatTime = (time) => {
|
|
|
533
533
|
: '';
|
|
534
534
|
};
|
|
535
535
|
exports.formatTime = formatTime;
|
|
536
|
-
const makeGroupOrderTimeStr = (
|
|
537
|
-
if (!
|
|
536
|
+
const makeGroupOrderTimeStr = (requestedAt, tz) => {
|
|
537
|
+
if (!requestedAt || requestedAt.toLowerCase() === 'asap')
|
|
538
538
|
return 'ASAP';
|
|
539
|
-
const orderTime =
|
|
539
|
+
const orderTime = (0, exports.makeReadableDateStrFromIso)(requestedAt, tz, true);
|
|
540
540
|
return orderTime ? (0, exports.formatTime)(orderTime) : null;
|
|
541
541
|
};
|
|
542
542
|
exports.makeGroupOrderTimeStr = makeGroupOrderTimeStr;
|
|
@@ -72,7 +72,7 @@ export declare const adjustRequestedAt: (requestedIso: ISOString, tz: Timezone,
|
|
|
72
72
|
export declare const getFirstTime: (revenueCenter: RevenueCenter, serviceType: ServiceType, tz: Timezone) => OrderTimeWithDate | FirstTime | null;
|
|
73
73
|
export declare const makeGroupOrderTime: (revenueCenter: RevenueCenter, serviceType: ServiceType, requestedAt: RequestedAt) => GroupOrderTime | GroupOrderPrepTime | null;
|
|
74
74
|
export declare const formatTime: (time: string) => string;
|
|
75
|
-
export declare const makeGroupOrderTimeStr: (
|
|
75
|
+
export declare const makeGroupOrderTimeStr: (requestedAt: RequestedAt | null, tz: Timezone) => string | null;
|
|
76
76
|
export declare const getLastInterval: (tz: Timezone) => Date;
|
|
77
77
|
export declare const makeIntervals: (tz: Timezone) => Array<Interval & {
|
|
78
78
|
orders: Array<Partial<Order>>;
|
|
@@ -470,10 +470,10 @@ export const formatTime = (time) => {
|
|
|
470
470
|
? time.replace('Today', 'today').replace('Tomorrow', 'tomorrow')
|
|
471
471
|
: '';
|
|
472
472
|
};
|
|
473
|
-
export const makeGroupOrderTimeStr = (
|
|
474
|
-
if (!
|
|
473
|
+
export const makeGroupOrderTimeStr = (requestedAt, tz) => {
|
|
474
|
+
if (!requestedAt || requestedAt.toLowerCase() === 'asap')
|
|
475
475
|
return 'ASAP';
|
|
476
|
-
const orderTime =
|
|
476
|
+
const orderTime = makeReadableDateStrFromIso(requestedAt, tz, true);
|
|
477
477
|
return orderTime ? formatTime(orderTime) : null;
|
|
478
478
|
};
|
|
479
479
|
export const getLastInterval = (tz) => {
|
package/package.json
CHANGED