implemented LOA cancelling and extensioning
This commit is contained in:
@@ -5,6 +5,7 @@ import { useUserStore } from './stores/user';
|
||||
import Alert from './components/ui/alert/Alert.vue';
|
||||
import AlertDescription from './components/ui/alert/AlertDescription.vue';
|
||||
import Navbar from './components/Navigation/Navbar.vue';
|
||||
import { cancelLOA } from './api/loa';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
@@ -29,10 +30,11 @@ const environment = import.meta.env.VITE_ENVIRONMENT;
|
||||
<p>This is a development build of the application. Some features will be unavailable or unstable.</p>
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
<Alert v-if="userStore.user?.loa?.[0]" class="m-2 mx-auto w-5xl" variant="info">
|
||||
<Alert v-if="userStore.user?.LOAData?.[0]" class="m-2 mx-auto w-5xl" variant="info">
|
||||
<AlertDescription class="flex flex-row items-center text-nowrap gap-5 mx-auto">
|
||||
<p>You are on LOA until <strong>{{ formatDate(userStore.user?.loa?.[0].end_date) }}</strong></p>
|
||||
<Button variant="secondary">End LOA</Button>
|
||||
<p>You are on LOA until <strong>{{ formatDate(userStore.user?.LOAData?.[0].end_date) }}</strong></p>
|
||||
<Button variant="secondary" @click="async () => { await cancelLOA(userStore.user?.LOAData?.[0].id); userStore.loadUser(); }">End
|
||||
LOA</Button>
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user