refactor: enhance transaction and appointment handling with pagination, status filtering, and improved data display
This commit is contained in:
@@ -23,6 +23,18 @@ export const convertToJalali = (date) => {
|
||||
return `${jalaliYear}/${jalaliMonth}/${jalaliDay}`;
|
||||
};
|
||||
|
||||
export const convertTimestampToJalali = (timestamp) => {
|
||||
if (!timestamp) return "--";
|
||||
const date = moment.unix(timestamp);
|
||||
return date.format("jYYYY/jMM/jDD");
|
||||
};
|
||||
|
||||
export const convertTimestampToTime = (timestamp) => {
|
||||
if (!timestamp) return "--";
|
||||
const date = moment.unix(timestamp);
|
||||
return date.format("HH:mm");
|
||||
};
|
||||
|
||||
export const handleTwoLength = (value) =>
|
||||
String(value).length === 1 ? `0${value}` : value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user