case 4503

This commit is contained in:
2023-04-06 00:43:52 +00:00
parent 585635939f
commit 772b17fa43

View File

@@ -118,7 +118,7 @@
v-if="selectedSavedFilterToOverWrite != null" v-if="selectedSavedFilterToOverWrite != null"
text text
color="primary" color="primary"
@click="saveAndExit('save-over-existing-named')" @click="saveAndExit('replace-column-filters')"
>{{ $ay.t("Replace") }}</v-btn >{{ $ay.t("Replace") }}</v-btn
> >
</v-card-actions> </v-card-actions>
@@ -154,37 +154,12 @@
text text
:disabled="!namedFilterIsSavable" :disabled="!namedFilterIsSavable"
color="primary" color="primary"
@click="saveAndExit('save-over-existing-named')" @click="saveAndExit('update-name-all-users')"
>{{ $ay.t("Save") }}</v-btn >{{ $ay.t("Save") }}</v-btn
> >
</v-card-actions> </v-card-actions>
</template> </template>
</v-card-text> </v-card-text>
<!-- <v-card-actions>
<v-btn text color="primary" @click="close()">{{
$ay.t("Cancel")
}}</v-btn>
<v-spacer />
<template v-if="isSelfOwned">
<v-btn text color="primary" @click="deleteFilter()">{{
$ay.t("Delete")
}}</v-btn>
<v-spacer />
</template>
<v-btn text color="primary" @click="saveAndExit(true)">{{
$ay.t("SaveAs")
}}</v-btn>
v-if="activeFilter.defaultFilter == false && isSelfOwned"
<template v-if="replaceMode">
<v-spacer />
<v-btn text color="primary" @click="saveAndExit()">{{
$ay.t("Replace")
}}</v-btn>
</template>
</v-card-actions> -->
</v-card> </v-card>
</v-dialog> </v-dialog>
</template> </template>
@@ -299,10 +274,26 @@ export default {
this.close({ refresh: true }); this.close({ refresh: true });
} }
}, },
async saveAndExit(saveAs) { async saveAndExit(saveMode) {
//TODO: if it's going to do a replace then it needs to get a fresh copy of the replacement filter and it's concurrency token etc //TODO: if it's going to do a replace then it needs to get a fresh copy of the replacement filter and it's concurrency token etc
//otherwise saveAs is fine as is I think //otherwise saveAs is fine as is I think
switch (saveMode) {
case "save-as-new":
//create new named filter with the column filter settings and selected name and all users settings of the current
//default filter
break;
case "replace-column-filters":
//replace existing named filter with the column filter settings (only) of the current
//default filter
break;
case "update-name-all-users":
//update existing named filter with the name and / or all users settings of the current
//default filter, column filter settings ignored / kept as is
break;
}
if (saveAs) { if (saveAs) {
//SAVE AS //SAVE AS
//strip ID //strip ID