Skip to content

Commit

Permalink
fix: no need for fetching in AppBar, more clarity in Admin.vue nextla…
Browse files Browse the repository at this point in the history
…unch btn
  • Loading branch information
rowangamal committed Aug 20, 2024
1 parent 4cfbdfe commit 8857797
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions client/src/layouts/default/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
"/otp",
"/newPassword",
"/maintenance",
"/nextlaunch",
// "/nextlaunch",
"/about"
]);
const items = ref([
Expand Down Expand Up @@ -216,16 +216,13 @@ export default {
};
const checkNextLaunch = () => {
userService.nextlaunch();
userService.handleNextLaunch();
nextlaunch.value = localStorage.getItem("nextlaunch") == "true";
if (!nextlaunch.value) {
router.push({ name: "NextLaunch" });
}
};
const checkMaintenance = () => {
userService.maintenance();
maintenance.value = localStorage.getItem("maintenance") == "false";
if (!maintenance.value) {
router.push({ name: "Maintenance" });
Expand Down
4 changes: 2 additions & 2 deletions client/src/views/Admin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@
</div>
<div class="text-center">
<template v-if="nextLaunchDialog">
<BaseButton color="green" text="Disable Next Launch" class="text-capitalize mr-2" @click="setNextLaunch"/>
<BaseButton color="green" text="Disable Launch" class="text-capitalize mr-2" @click="setNextLaunch"/>
</template>
<template v-else>
<BaseButton color="red" text="Enable Next Launch" class="text-capitalize mr-2" @click="setNextLaunch"/>
<BaseButton color="red" text="Enable Launch" class="text-capitalize mr-2" @click="setNextLaunch"/>
</template>
</div>
<BaseButton :disabled="approveAllCount <= 0" color="success" text="Approve All" class="approve text-capitalize"
Expand Down

0 comments on commit 8857797

Please sign in to comment.