-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved: support for route filters(#24)
Handled case to create, update, and delete filter Improved logic for reordering the sort options and updating the sequenceNum Fixed cases to handle undefined values
- Loading branch information
1 parent
bfa29a6
commit ef9935e
Showing
3 changed files
with
115 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<ion-content> | ||
<ion-list> | ||
<ion-list-header> | ||
<ion-label>{{ $t("Promise date") }}</ion-label> | ||
</ion-list-header> | ||
<ion-item button @click="updatePromiseDate()"> | ||
<ion-label>{{ $t("Already passed") }}</ion-label> | ||
</ion-item> | ||
<ion-item button @click="updatePromiseDate('Upcoming duration')"> | ||
<ion-label>{{ $t("Upcoming duration") }}</ion-label> | ||
</ion-item> | ||
<ion-item button lines="none" @click="updatePromiseDate('Passed duration', true)"> | ||
<ion-label>{{ $t("Passed duration") }}</ion-label> | ||
</ion-item> | ||
</ion-list> | ||
</ion-content> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { IonContent, IonItem, IonLabel, IonList, IonListHeader, alertController, popoverController } from "@ionic/vue"; | ||
async function updatePromiseDate(header = '', isPastDuration = false) { | ||
let duration = 0 | ||
if(!header) { | ||
popoverController.dismiss({ duration }) | ||
return; | ||
} | ||
const durationAlert = await alertController.create({ | ||
header, | ||
buttons: [{ | ||
text: "Cancel", | ||
role: "cancel" | ||
}, { | ||
text: "Save" | ||
}], | ||
inputs: [{ | ||
name: "duration", | ||
placeholder: "duration" | ||
}] | ||
}) | ||
durationAlert.onDidDismiss().then(async (result: any) => { | ||
// considered that if a role is available on dismiss, it will be a negative role in which we don't need to perform any action | ||
if(result.role) { | ||
return; | ||
} | ||
// TODO: add checks for duration value | ||
const duration = result.data?.values?.duration; | ||
popoverController.dismiss({ duration, isPastDuration }) | ||
}) | ||
return durationAlert.present(); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters