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