Abilitazione del BOT

This commit is contained in:
Surya Paolo
2023-12-17 16:20:50 +01:00
parent fa544bc30c
commit a941592c21
6 changed files with 65 additions and 4 deletions

View File

@@ -91,7 +91,8 @@
>
<q-icon name="fas fa-balance-scale" class="q-mr-xs" />
{{ t('products.weight') }}:
<span class="text-black q-ml-xs text-h8">
<span class="text-black q-ml-xs text-h8"
v-if="myproduct.unit">
{{ myproduct.weight }}
{{ tools.getUnitsMeasure(myproduct.unit, true) }}</span
>
@@ -135,7 +136,7 @@
<div
v-if="
tools.isManager() && myproduct.QuantitaOrdinateInAttesa > 0
tools.isManager() && myproduct.QuantitaOrdinateInAttesa && myproduct.QuantitaOrdinateInAttesa > 0
"
>
{{

View File

@@ -305,6 +305,8 @@ export interface ISites {
telegram_key?: string
telegram_bot_name?: string
telegram_key_test?: string
load_process_telegram_test?: string
load_process_telegram?: string
telegram_bot_name_test?: string
telegram_support_chat?: string
pathreg_add?: string

View File

@@ -1654,6 +1654,8 @@ export const colTableSites = [
AddCol({ name: 'telegram_bot_name', label_trans: 'sites.telegram_bot_name', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'telegram_support_chat', label_trans: 'sites.telegram_support_chat', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'telegram_key_test', label_trans: 'sites.telegram_key_test', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'load_process_telegram_test', label_trans: 'sites.load_process_telegram_test', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'load_process_telegramt', label_trans: 'sites.load_process_telegram', fieldtype: costanti.FieldType.boolean}),
AddCol({
name: 'telegram_bot_name_test',
label_trans: 'sites.telegram_bot_name_test',

View File

@@ -238,8 +238,10 @@ export const useProducts = defineStore('Products', {
let ris = null
console.log('Ottieni Prodotti')
ris = await Api.SendReq('/products', 'POST', { userId: userStore.my._id })
.then((res) => {
console.log('Prodotti scaricati')
if (res.data.products) {
this.products = res.data.products
} else {

View File

@@ -570,6 +570,14 @@
></q-btn>
<br />
</div>
<div class="row">
<q-btn
label="generateBotMenuRecords"
color="primary"
@click="EseguiFunz('generateBotMenuRecords')"
></q-btn>
<br />
</div>
</template>
<script lang="ts" src="./dbop.ts">
</script>

View File

@@ -35,6 +35,19 @@
<q-item-label v-if="col.name === 'created_at'" caption
>{{ tools.getstrDateTime(col.value) }}
</q-item-label>
<q-item-label
v-else-if="col.name === 'nameSurname'"
caption
>
<span v-if="props.row.user">
<span
:class="
props.row.user.name !== 'TOTALI' ? '' : 'totali'
"
>{{ tools.getNomeUtenteByRecUser(props.row.user) }}
</span></span
>
</q-item-label>
<q-item-label v-else-if="col.name === 'items'" caption>
<div
v-for="(item, index) of props.row.items"
@@ -58,6 +71,40 @@
<q-item-label v-else-if="col.name === 'status'" caption>
{{ shared_consts.getStatusStr(props.row.status) }}
</q-item-label>
<q-item-label v-else-if="col.name === 'comandi'" caption>
<div
v-if="
tools.isManager() &&
props.row.user.name !== 'TOTALI'
"
class="q-pa-sm"
>
<q-btn-dropdown rounded dense label="Azioni">
<q-list class="text-primary">
<q-item
v-for="(
cmd, index
) of shared_consts.OrderCmdStr"
:key="index"
clickable
v-close-popup
@click="clickFunz(props.row, cmd.value)"
>
<q-item-section avatar>
<q-avatar
:icon="cmd.icon"
:color="cmd.color"
text-color="white"
/>
</q-item-section>
<q-item-section>
<q-item-label>{{ cmd.label }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
</q-item-label>
<q-item-label v-else caption>{{
col.value
}}</q-item-label>
@@ -79,8 +126,7 @@
<span
:class="props.row.user.name !== 'TOTALI' ? '' : 'totali'"
>{{ tools.getNomeUtenteByRecUser(props.row.user) }}
</span
></span
</span></span
>
</q-td>
<q-td key="created_at" :props="props">