<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>
