UAE added
This commit is contained in:
parent
1868deb813
commit
6aa8091774
@ -205,17 +205,18 @@ exports.createSubmission = async (req, res) => {
|
||||
const AdminUsersData = await User.findAll({where: { is_active: 1 }});
|
||||
|
||||
const formatSubmissionDate = (date) => {
|
||||
return new Intl.DateTimeFormat("en-GB", {
|
||||
day: "2-digit",
|
||||
month: "short",
|
||||
year: "numeric",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: true,
|
||||
timeZone: "Asia/Dubai",
|
||||
timeZoneName: "short"
|
||||
}).format(new Date(date))
|
||||
.replace("GMT+4", "GST (UAE)");
|
||||
const formatted = new Intl.DateTimeFormat("en-GB", {
|
||||
day: "2-digit",
|
||||
month: "short",
|
||||
year: "numeric",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: true,
|
||||
timeZone: "Asia/Dubai"
|
||||
}).format(new Date(date));
|
||||
const [datePart, timePart] = formatted.split(", ");
|
||||
const upperTime = timePart.toUpperCase();
|
||||
return `${datePart}, ${upperTime} GST (UAE)`;
|
||||
};
|
||||
|
||||
// Shared placeholder data
|
||||
@ -818,8 +819,8 @@ exports.approveOrRejectSubmission = async (req, res) => {
|
||||
for await (const userObj of EstablishmentUserData)
|
||||
{
|
||||
|
||||
function formatSubmissionDate(date) {
|
||||
return new Intl.DateTimeFormat("en-GB", {
|
||||
const formatSubmissionDate = (date) => {
|
||||
const formatted = new Intl.DateTimeFormat("en-GB", {
|
||||
day: "2-digit",
|
||||
month: "short",
|
||||
year: "numeric",
|
||||
@ -827,10 +828,11 @@ exports.approveOrRejectSubmission = async (req, res) => {
|
||||
minute: "2-digit",
|
||||
hour12: true,
|
||||
timeZone: "Asia/Dubai"
|
||||
})
|
||||
.format(new Date(date))
|
||||
.replace(",", "") + " GST (UAE)";
|
||||
}
|
||||
}).format(new Date(date));
|
||||
const [datePart, timePart] = formatted.split(", ");
|
||||
const upperTime = timePart.toUpperCase();
|
||||
return `${datePart}, ${upperTime} GST (UAE)`;
|
||||
};
|
||||
|
||||
placeHolderData = {
|
||||
user_name: sanitizeForLog(userObj.name),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user