minor fixes
This commit is contained in:
@@ -45,8 +45,8 @@ module.exports = {
|
|||||||
time_zones: [],
|
time_zones: [],
|
||||||
is_loading_time: false,
|
is_loading_time: false,
|
||||||
selected_date: null,
|
selected_date: null,
|
||||||
selected_hours: `${new Date().getHours()}`,
|
selected_hours: this.current_time == null ? "00" : this.current_time.getHours(),
|
||||||
selected_minutes: `${new Date().getMinutes()}`,
|
selected_minutes: this.current_time == null ? "00" : this.current_time.getMinutes(),
|
||||||
selected_meridiem: "AM",
|
selected_meridiem: "AM",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -72,7 +72,7 @@ module.exports = {
|
|||||||
hour: "2-digit",
|
hour: "2-digit",
|
||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
second: "2-digit",
|
second: "2-digit",
|
||||||
hour12: this.config.admin.time_format === true,
|
hour12: this.config.admin.time_format !== true,
|
||||||
};
|
};
|
||||||
if (this.current_timezone != "") {
|
if (this.current_timezone != "") {
|
||||||
options.timeZone = this.current_timezone;
|
options.timeZone = this.current_timezone;
|
||||||
@@ -265,9 +265,17 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
change_timezone: function () {
|
change_timezone: async function () {
|
||||||
try {
|
try {
|
||||||
console.log(this.selected_timezone);
|
console.log(this.selected_timezone);
|
||||||
|
// const response = await api.put("time", { timezone: this.selected_timezone });
|
||||||
|
|
||||||
|
// if (response == "ok") {
|
||||||
|
// alert("Time zone updated successfully.");
|
||||||
|
// this.fetch_current_time();
|
||||||
|
// } else {
|
||||||
|
// throw response;
|
||||||
|
// }
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
alert("Error updating time zone");
|
alert("Error updating time zone");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,8 +71,7 @@ script#admin-general-view-template(type="text/x-template")
|
|||||||
|
|
||||||
.pure-form
|
.pure-form
|
||||||
select(v-model="selected_timezone")
|
select(v-model="selected_timezone")
|
||||||
option(v-for="(index,timezone) in time_zone" :value=timezone) {{ timezone }}
|
option(v-for="timezone in time_zones" :value=timezone) {{ timezone }}
|
||||||
|
|
||||||
button.pure-button.pure-button-primary(@click="change_timezone", style="margin:5px") Change Time Zone
|
button.pure-button.pure-button-primary(@click="change_timezone", style="margin:5px") Change Time Zone
|
||||||
|
|
||||||
h2 Date/Time
|
h2 Date/Time
|
||||||
|
|||||||
Reference in New Issue
Block a user