@@ -104,8 +104,8 @@ let ads: any[] = $ref([]);
const localTime = new Date();
const localTimeDiff = localTime.getTimezoneOffset() * 60 * 1000;
const daysOfWeek: string[] = [i18n.ts._weekday.sunday, i18n.ts._weekday.monday, i18n.ts._weekday.tuesday, i18n.ts._weekday.wednesday, i18n.ts._weekday.thursday, i18n.ts._weekday.friday, i18n.ts._weekday.saturday];
+const filterType = ref('all');
let publishing: boolean | null = null;
-let type = ref('null');
os.api('admin/ad/list', { publishing: publishing }).then(adsResponse => {
if (adsResponse != null) {
@@ -123,9 +123,15 @@ os.api('admin/ad/list', { publishing: publishing }).then(adsResponse => {
}
});
-const onChangePublishing = (v) => {
- console.log(v);
- publishing = v === 'true' ? true : v === 'false' ? false : null;
+const filterItems = (v) => {
+ if (v === 'publishing') {
+ publishing = true;
+ } else if (v === 'expired') {
+ publishing = false;
+ } else {
+ publishing = null;
+ }
+
refresh();
};