Poter inserire un Ordine anche per un altra persona... (Modalità Cassa)
This commit is contained in:
0
src/components/CSelectUserActive/CSelectUserActive.scss
Executable file
0
src/components/CSelectUserActive/CSelectUserActive.scss
Executable file
26
src/components/CSelectUserActive/CSelectUserActive.ts
Executable file
26
src/components/CSelectUserActive/CSelectUserActive.ts
Executable file
@@ -0,0 +1,26 @@
|
||||
import { defineComponent, ref } from 'vue'
|
||||
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useProducts } from '@store/Products'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CSelectUserActive',
|
||||
props: {
|
||||
},
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
const { t } = useI18n()
|
||||
|
||||
const userStore = useUserStore()
|
||||
const productStore = useProducts()
|
||||
|
||||
return {
|
||||
userStore,
|
||||
productStore,
|
||||
t,
|
||||
tools,
|
||||
}
|
||||
},
|
||||
})
|
||||
22
src/components/CSelectUserActive/CSelectUserActive.vue
Executable file
22
src/components/CSelectUserActive/CSelectUserActive.vue
Executable file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<q-select
|
||||
v-if="tools.isSeller() && productStore.userActive"
|
||||
v-model="productStore.userActive"
|
||||
:options="userStore.usersList"
|
||||
label="Spesa dell'Utente:"
|
||||
filled
|
||||
:bg-color="userStore.my._id !== productStore.userActive._id ? 'green' : undefined"
|
||||
:option-label="(opt) => tools.getNomeUtenteEUsernameByRecUser(opt)"
|
||||
option-value="null"
|
||||
emit-value
|
||||
map-options
|
||||
@update:model-value="productStore.changeuserActive(productStore.userActive)"
|
||||
>
|
||||
</q-select>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CSelectUserActive.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CSelectUserActive.scss';
|
||||
</style>
|
||||
1
src/components/CSelectUserActive/index.ts
Executable file
1
src/components/CSelectUserActive/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CSelectUserActive} from './CSelectUserActive.vue'
|
||||
Reference in New Issue
Block a user