minor changes

This commit is contained in:
sanjayk03-dev
2024-08-27 22:13:41 +05:30
parent 7556234188
commit 4624e5cafd
2 changed files with 2 additions and 5 deletions

View File

@@ -152,7 +152,6 @@ module.exports = {
if (!this.selected_date || !this.selected_hours || !this.selected_minutes) { if (!this.selected_date || !this.selected_hours || !this.selected_minutes) {
return; return;
} }
try { try {
const datetime = `${this.selected_date} ${this.selected_hours}:${this.selected_minutes}:00`; const datetime = `${this.selected_date} ${this.selected_hours}:${this.selected_minutes}:00`;
const response = await api.put("time", { datetime }); const response = await api.put("time", { datetime });
@@ -162,8 +161,6 @@ module.exports = {
} else { } else {
throw response; throw response;
} }
console.log("Time update successful: ", response);
} catch (error) { } catch (error) {
alert("Error updating time: ", error); alert("Error updating time: ", error);
} }

View File

@@ -67,6 +67,6 @@ script#admin-general-view-template(type="text/x-template")
h2 Date/Time h2 Date/Time
.pure-form .pure-form
input(id="date" type="date" v-model="selected_date") input(id="date" type="date" v-model="selected_date")
input(id="hours" type="text" v-model="selected_hours" placeholder="HH" maxlength="2" min="0" max="23") input(id="hours" type="text" v-model="selected_hours" placeholder="HH" maxlength="2" min="0" max="23" style="width:45px")
input(id="minutes" type="text" v-model="selected_minutes" placeholder="MM" maxlength="2" min="0" max="59") input(id="minutes" type="text" v-model="selected_minutes" placeholder="MM" maxlength="2" min="0" max="59" style="width:45px")
button.pure-button.pure-button-primary(@click="change_date_time", style="margin:5px") Update Date/Time button.pure-button.pure-button-primary(@click="change_date_time", style="margin:5px") Update Date/Time