option all inbounds for client modal #399

This commit is contained in:
Alireza Ahmadi
2025-01-18 12:28:35 +01:00
parent d06b6be4a2
commit f116e7f5ea
+11 -4
View File
@@ -80,10 +80,14 @@
v-model="clientInbounds" v-model="clientInbounds"
:items="inboundTags" :items="inboundTags"
:label="$t('client.inboundTags')" :label="$t('client.inboundTags')"
clearable
multiple multiple
chips chips
hide-details hide-details>
></v-select> <template v-slot:append>
<v-icon style="cursor: hand;" @click="setAllInbounds" icon="mdi-set-all" v-tooltip:top="$t('all')" />
</template>
</v-select>
</v-col> </v-col>
</v-row> </v-row>
</v-window-item> </v-window-item>
@@ -239,12 +243,15 @@ export default {
}, },
setDate(newDate:number){ setDate(newDate:number){
this.client.expiry = newDate this.client.expiry = newDate
},
setAllInbounds(){
this.client.inbounds = this.inboundTags.map((i:any) => i.value).sort()
} }
}, },
computed: { computed: {
clientInbounds: { clientInbounds: {
get() { return this.client.inbounds.length>0 ? this.client.inbounds : [] }, get() { return this.client.inbounds.length>0 ? this.client.inbounds.sort() : [] },
set(v:number[]) { this.client.inbounds = v.length == 0 ? [] : v } set(v:number[]) { this.client.inbounds = v.length == 0 ? [] : v.sort() }
}, },
expDate: { expDate: {
get() { return this.client.expiry}, get() { return this.client.expiry},