feat: implement product approval workflow updates
This commit is contained in:
@@ -59,6 +59,10 @@ export class DateFormatPipe implements PipeTransform, OnDestroy {
|
||||
if (Array.isArray(value)) {
|
||||
// Backend sometimes returns [yyyy, MM, dd]
|
||||
dateVal = moment(value.join('-'), 'YYYY-MM-DD');
|
||||
} else if (typeof value === 'number' && value < 1e12) {
|
||||
// Unix timestamp in seconds (e.g. /makercheckers madeOnDate).
|
||||
// moment(seconds) would treat it as milliseconds → 1970; use moment.unix() instead.
|
||||
dateVal = moment.unix(value);
|
||||
} else {
|
||||
dateVal = moment(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user