<template>
  <div v-if="optcatalogo" :class="{
    ' items-start q-gutter-sm': true,
  }" :style="scheda.dimensioni?.pagina?.dimensioni?.size?.height
    ? ' height: ' +
    tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.height) +
    'px !important; '
    : ''
    ">
    <q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
    <q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />


    <div v-if="!!myproduct && !!myproduct.productInfo" :class="{
      'my-card-big book-details': complete,
      'book-card': !complete && !optcatalogo.pdf,
      colfix_prodotti_1: options.quante_col == 'c1' && !optcatalogo.pdf,
      colfix_prodotti_2: options.quante_col == 'c2' && !optcatalogo.pdf,
      colfix_prodotti_3: options.quante_col == 'c3' && !optcatalogo.pdf,
    }">
      <q-page-sticky v-if="complete && !optcatalogo.pdf" position="bottom-right" :offset="[18, 0]"
        style="z-index: 1000">
        <q-btn fab icon="fas fa-arrow-up" class="semi-transparent" color="primary" v-close-popup />
      </q-page-sticky>

      <q-card-section>
        <div v-if="scheda.testo_right_attaccato || scheda.testo_right" :class="[
          'flex', // Classi comuni
          'image-container',
          { 'shadow-2': options.in_3d && !optcatalogo.pdf }, // Classe condizionale
          scheda.testo_right_attaccato.font?.posiz_text ===
            costanti.POSIZ_TESTO.IN_BASSO
            ? ''
            : 'flex flex-row', // Layout flessibile
        ]" :style="{
          gap:
            tools.adjustSize(
              optcatalogo,
              scheda.dimensioni?.scheda_prodotto?.size?.gap
            ) ?? '0.1rem',
          width:
            tools.adjustSize(
              optcatalogo,
              scheda.dimensioni?.scheda_prodotto?.size?.width
            ) ?? '100%',
          height: tools.adjustSize(
            optcatalogo,
            scheda.dimensioni?.scheda_prodotto?.size?.height
          ),
        }">
          <div>
            <a :href="myproduct.productInfo.link_macro" target="_blank">
              <q-img v-if="myproduct.productInfo" :src="myproduct.productInfo.imagefile
                ? tools.getFullFileNameByImageFile(
                  'productInfos',
                  myproduct.productInfo.imagefile
                )
                : myproduct.productInfo.image_link
                " :alt="myproduct.productInfo.name" :fit="scheda.dimensioni?.immagine_prodotto?.size?.fit ?? 'cover'
                  " :class="{
                    'book-image-fixed': complete,
                    'cursor-pointer': !complete,
                    'shadow-4': !optcatalogo.pdf,
                    'border-box': optcatalogo.pdf,
                  }" :style="{
                    zIndex: 2,
                    width:
                      scheda.testo_right.font?.posiz_text ===
                        costanti.POSIZ_TESTO.IN_BASSO
                        ? scheda.testo_right.font?.perc_text ?? '50%'
                        : '45%',
                    ...(tools.adjustSize(
                      optcatalogo,
                      scheda.dimensioni?.immagine_prodotto?.size?.width
                    ) && {
                      width:
                        tools.adjustSize(
                          optcatalogo,
                          scheda.dimensioni?.immagine_prodotto.size?.width
                        ) + ' !important',
                    }),
                    height: scheda.dimensioni?.immagine_prodotto?.size?.height
                      ? tools.adjustSize(
                        optcatalogo,
                        scheda.dimensioni?.immagine_prodotto?.size?.height
                      )
                      : undefined,
                    display: 'block',
                  }" @click="click_opendetail()" />
            </a>
            <q-card-actions class="q-pa-none q-ma-none absolute-top-left">
              <div class="column">
                <q-fab v-if="
                  (tools.isManager() || tools.isEditor()) &&
                  !optcatalogo.generazionePDFInCorso &&
                  (editOn || options.show_edit_book)
                " color="primary" icon="fas fa-pencil-alt" direction="down" flat dense>
                  <q-fab-action v-if="
                    tools.isManager() &&
                    !optcatalogo.generazionePDFInCorso &&
                    (editOn || options.show_edit_book)
                  " icon="fas fa-pencil-alt" label="Aggiorna da GM" color="accent" @click="refreshDataFromGM()" />
                  <q-fab-action v-if="
                    tools.isManager() &&
                    !optcatalogo.generazionePDFInCorso &&
                    (editOn || options.show_edit_book)
                  " icon="fas fa-pencil-alt" label="Visualizza su GM" color="positive" @click="
                    showQtaDisponibile = false;
                  visufromgm = true;
                  " />
                  <q-fab-action v-if="
                    tools.isManager() &&
                    !optcatalogo.generazionePDFInCorso &&
                    (editOn || options.show_edit_book)
                  " icon="fas fa-eye" label="Vedi Numero di Pagine (Da GM)" color="positive"
                    @click="refreshFieldFromGM('Pagine')" />
                  <q-fab-action v-if="
                    tools.isManager() &&
                    !optcatalogo.generazionePDFInCorso &&
                    (editOn || options.show_edit_book)
                  " icon="fas fa-pencil-alt" label="Visualizza su GM (Tutti i campi)" color="positive" @click="
                    showQtaDisponibile = true;
                  visufromgm = true;
                  " />
                  <q-fab-action v-if="
                    (tools.isManager() || tools.isEditor()) &&
                    !optcatalogo.generazionePDFInCorso &&
                    (editOn || options.show_edit_book)
                  " label="Modifica" icon="fas fa-pencil-alt" color="primary" @click="modifOn = !modifOn" />
                </q-fab>
              </div>
            </q-card-actions>
          </div>

          <!-- Testo sotto all'immagine  -->
          <CText :rectext="scheda.testo_right_attaccato" :myproduct="myproduct" :optcatalogo="optcatalogo"
            :scheda="scheda" :idPage="idPage">
            <div v-if="
              scheda.testo_right_attaccato.font?.posiz_text !==
              costanti.POSIZ_TESTO.IN_BASSO
            " :style="{
              alignSelf:
                scheda.testo_right_attaccato.font?.posiz_text ===
                  costanti.POSIZ_TESTO.IN_BASSO
                  ? ''
                  : 'end',
              marginTop:
                scheda.testo_right_attaccato.font?.posiz_text ===
                  costanti.POSIZ_TESTO.IN_BASSO
                  ? 'auto'
                  : '0',
            }">
              <CText :rectext="scheda.testo_right" :myproduct="myproduct" :optcatalogo="optcatalogo"
                :show_at_right="scheda.barcode?.show_at_right" :scheda="scheda" :idPage="idPage">
                <div class="row no-wrap items-center">
                  <div v-if="scheda.barcode && scheda.barcode.show">
                    <CBarCode :value="myproduct.productInfo.code" :format="scheda.barcode.format"
                      :fontsizeprop="scheda.barcode.font?.size" :gap="tools.adjustSize(optcatalogo, scheda.barcode.size?.gap)
                        " :width="parseInt(
                          tools.adjustSize(
                            optcatalogo,
                            scheda.barcode.size?.width
                          )
                        )
                          " :widthlines="tools.adjustSize(optcatalogo, scheda.barcode.widthlines)
                            " :height="tools.adjustSize(
                            optcatalogo,
                            scheda.barcode.size?.height
                          )
                            " :show_at_right="scheda.barcode?.show_at_right">
                    </CBarCode>
                  </div>
                  <div v-if="
                    scheda.etichette?.bestseller?.show &&
                    isProductBestseller()
                  ">
                    <q-img src="/images/bestseller.png" alt="Bestseller"
                      :width="40 * tools.getScale(optcatalogo) + 'px'" :height="40 * tools.getScale(optcatalogo) + 'px'"
                      fit="contain"></q-img>
                  </div>
                  <div v-else-if="
                    scheda.etichette?.novita?.show && isProductNovita()
                  ">
                    <q-img src="/images/novita.png" alt="Novita" :width="40 * tools.getScale(optcatalogo) + 'px'"
                      :height="40 * tools.getScale(optcatalogo) + 'px'" fit="contain"></q-img>
                  </div>
                </div>
              </CText>
            </div>
          </CText>
          <div v-if="
            scheda.testo_right_attaccato.font?.posiz_text ===
            costanti.POSIZ_TESTO.IN_BASSO
          " class="flexible-width" :style="{
            marginTop: 'auto',
          }">
            <CText :rectext="scheda.testo_right" :myproduct="myproduct" :optcatalogo="optcatalogo" :scheda="scheda"
              :show_at_right="scheda.barcode?.show_at_right" :idPage="idPage">
              <div class="row no-wrap items-center">
                <div v-if="scheda.barcode && scheda.barcode.show">
                  <CBarCode :value="myproduct.productInfo.code" :format="scheda.barcode.format"
                    :fontsizeprop="scheda.barcode.font?.size" :gap="tools.adjustSize(optcatalogo, scheda.barcode.size?.gap)
                      " :width="parseInt(
                        tools.adjustSize(
                          optcatalogo,
                          scheda.barcode.size?.width
                        )
                      )
                        " :widthlines="tools.adjustSize(optcatalogo, scheda.barcode.widthlines)
                          " :height="tools.adjustSize(optcatalogo, scheda.barcode.size?.height)
                          " :show_at_right="scheda.barcode.show_at_right">
                  </CBarCode>
                </div>
                <div v-if="
                  scheda.etichette?.bestseller?.show && isProductBestseller()
                ">
                  <q-img src="/images/bestseller.png" alt="Bestseller" :width="40 * tools.getScale(optcatalogo) + 'px'"
                    :height="40 * tools.getScale(optcatalogo) + 'px'" fit="contain"></q-img>
                </div>
                <div v-else-if="
                  scheda.etichette?.novita?.show && isProductNovita()
                ">
                  <q-img src="/images/novita.png" alt="Novita" :width="40 * tools.getScale(optcatalogo) + 'px'"
                    :height="40 * tools.getScale(optcatalogo) + 'px'" fit="contain"></q-img>
                </div>
              </div>
            </CText>
          </div>

          <div v-if="optcatalogo.indebug" :style="{
            width: '100%',
          }">
            <div :style="{
              '--scalecatalog': tools.getScale(optcatalogo),
              'line-height': scheda.testo_bottom.font?.line_height,
            }" v-html="getTesto_Debug"></div>
          </div>
          <!-- Testo sotto al testo attaccato, allineato al fondo -->
          <CText v-else-if="scheda.testo_bottom && getTesto_Bottom" :rectext="scheda.testo_bottom" :scheda="scheda"
            :myproduct="myproduct" :optcatalogo="optcatalogo" :idPage="idPage"></CText>
          <!--<div v-if="optcatalogo.indebug">testo: "{{ getTesto_Bottom }}"</div>-->
        </div>
      </q-card-section>
      <q-separator v-if="complete" class="q-my-sm"></q-separator>
      <q-card-section v-if="complete && myproduct.productInfo.description">
        <div class="title-descr text-blue row">Descrizione:</div>
        <div class="row items-center">
          <div class="text-title text-grey-9">
            <span class="text-grey-7" v-html="myproduct.productInfo.description"></span>
          </div>
        </div>
      </q-card-section>
    </div>

    <q-dialog v-if="myproduct" v-model="openlistorders">
      <q-card class="dialog_card">
        <q-toolbar class="bg-primary text-white">
          <q-toolbar-title>
            {{ t("ecomm.listaord") }} - {{ myproduct.productInfo.name }}
          </q-toolbar-title>
          <q-btn flat round color="white" icon="close" v-close-popup></q-btn>
        </q-toolbar>
        <q-card-section class="q-pa-xs inset-shadow">
          <q-markup-table wrap-cells bordered separator="horizontal" class="listaev__table">
            <thead>
              <tr>
                <th>Data</th>
                <th>Persona</th>
                <th>Stato</th>
                <th>Quantita</th>
                <th>Note</th>
              </tr>
            </thead>

            <tbody>
              <tr v-for="(ordcart, index) of listord" :key="index" class="listaev listaev__table">
                <td class="text-center">
                  <div>
                    {{ func_tools.getDateTimeShortStr(ordcart.created_at) }}
                  </div>
                </td>
                <td class="text-center">
                  <strong>{{
                    tools.getNomeUtenteEUsernameByRecUser(ordcart.user)
                    }}</strong>
                </td>
                <td class="text-center">
                  <strong>{{
                    shared_consts.getStatusStr(ordcart.status)
                    }}</strong>
                </td>
                <td class="text-center">
                  <div v-for="(singleord, index) in ordcart.items" :key="index">
                    <span v-if="
                      singleord.order.idProduct === myproduct._id &&
                      singleord.order.quantity > 0
                    ">
                      {{ singleord.order.quantity }}</span>
                    <span v-if="
                      singleord.order.idProduct === myproduct._id &&
                      singleord.order.quantitypreordered > 0
                    ">
                      {{ singleord.order.quantitypreordered }}</span>
                  </div>
                </td>
                <td class="text-center">
                  {{ ordcart.note }}
                </td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td class="text-center">
                  Totali:
                  <span class="totali">{{ sumval }}</span>
                </td>
                <td>&nbsp;</td>
              </tr>
            </tbody>
          </q-markup-table>
        </q-card-section>
      </q-card>
    </q-dialog>

    <q-dialog v-if="
      true &&
      myproduct &&
      myproduct.productInfo &&
      myproduct.productInfo.link_scheda
    " v-model="apriSchedaPDF" maximized>
      <q-card>
        <q-toolbar class="bg-primary text-white">
          <q-toolbar-title>
            {{ myproduct.productInfo.name }}
          </q-toolbar-title>
          <q-btn flat round color="white" label="CHIUDI" icon="close" v-close-popup></q-btn>
        </q-toolbar>
        <q-card-section>
          <iframe :src="myproduct.productInfo.link_scheda" frameborder="0" width="100%" height="100%"></iframe>
        </q-card-section>
      </q-card>
      <q-card-actions align="center">
        <q-btn color="primary" label="Chiudi" @click="apriSchedaPDF = false" />
      </q-card-actions>
    </q-dialog>

    <q-dialog v-if="
      false &&
      myproduct &&
      myproduct.productInfo &&
      myproduct.productInfo.link_scheda
    " v-model="apriSchedaPDF" fullscreen>
      <q-toolbar class="bg-primary text-white">
        <q-toolbar-title>
          {{ myproduct.productInfo.name }}
        </q-toolbar-title>
        <q-btn flat round color="white" label="CHIUDI" icon="close" v-close-popup></q-btn>
      </q-toolbar>
      <q-card-section>
        <vue-pdf-app :pdf="myproduct.productInfo.link_scheda" style="height: 100vh"></vue-pdf-app>
      </q-card-section>
    </q-dialog>

    <q-dialog v-model="isFullScreen" position="top" :maximized="true" class="q-pt-none">
      <div v-if="isFullScreen" class="fullscreen-container" @touchmove.prevent @click="toggleFullScreen">
        <q-img :src="myproduct.productInfo.imagefile
          ? `` + myproduct.productInfo.imagefile
          : myproduct.productInfo.image_link
          " :alt="myproduct.productInfo.name" :fit="tools.isMobile() ? 'fill' : 'contain'" class="fullscreen-image"
          @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" ref="fullscreenImage">
        </q-img>
        <br />
      </div>
      <div class="text-center">
        <q-btn class="q-ma-md" @click="isFullScreen = false" label="Chiudi" rounded color="primary"
          icon="close"></q-btn>
      </div>
    </q-dialog>
    <q-dialog v-if="myproduct && modifOn" v-model="modifOn">
      <q-card class="dialog_card">
        <q-toolbar class="bg-primary text-white">
          <q-toolbar-title>
            Modifica a {{ myproduct.productInfo.name }}</q-toolbar-title>
          <q-btn flat round color="white" icon="close" v-close-popup></q-btn>
        </q-toolbar>
        <q-card-section class="q-pa-xs inset-shadow">
          <div class="column">
            <div class="etichetta">Titolo:</div>
            <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
              :rec="myproduct.productInfo" mykey="name" debounce="1000" :save="updateproductmodif()"
              :type="costanti.FieldType.string">
            </CMyValueDb>
            <div class="etichetta">SottoTitolo:</div>
            <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
              :rec="myproduct.productInfo" mykey="sottotitolo" debounce="1000" :save="updateproductmodif()"
              :type="costanti.FieldType.string">
            </CMyValueDb>
            <div class="etichetta">Descrizione Estesa:</div>
            <CMyValueDb :editOn="modifOn" :title="t('catalogo.descrizione_estesa')" table="productinfos"
              :id="myproduct.productInfo._id" :rec="myproduct.productInfo" mykey="descrizione_completa_macro"
              :maxlength="scheda.testo_bottom.maxlength
                ? scheda.testo_bottom.maxlength
                : 10000
                " debounce="1000" :save="updateproductmodif()" :type="costanti.FieldType.string">
            </CMyValueDb>
            <div class="row q-ma-xm q-pa-xs">
              <div class="boxtitleval">
                <div class="etichetta">Pagine:</div>
                <CMyValueDb :editOn="modifOn" :title="t('catalogo.pagine')" table="arrvariazioni" :id="myproduct._id"
                  :rec="myproduct" mykey="pagine" debounce="1000" :save="updateproductmodif()"
                  :type="costanti.FieldType.number">
                </CMyValueDb>
              </div>
              <div class="boxtitleval">
                <div class="etichetta">Misure:</div>
                <CMyValueDb :editOn="modifOn" :title="t('catalogo.misure')" table="arrvariazioni" :id="myproduct._id"
                  :rec="myproduct" mykey="misure" debounce="1000" :save="updateproductmodif()"
                  :type="costanti.FieldType.string">
                </CMyValueDb>
              </div>
              <div class="boxtitleval">
                <div class="etichetta">Pubblicazione:</div>
                <CMyValueDb :editOn="modifOn" :title="t('catalogo.date_pub')" table="productinfos"
                  :id="myproduct.productInfo._id" :rec="myproduct.productInfo" mykey="date_pub" debounce="1000"
                  :save="updateproductmodif()" :type="costanti.FieldType.date">
                </CMyValueDb>
              </div>
              <div class="boxtitleval">
                <div class="etichetta">Formato:</div>
                <CMyValueDb :editOn="modifOn" :title="t('catalogo.formato')" table="arrvariazioni" :id="myproduct._id"
                  :rec="myproduct" mykey="formato" debounce="1000" :save="updateproductmodif()"
                  :type="costanti.FieldType.string">
                </CMyValueDb>
              </div>
              <div class="boxtitleval">
                <div class="etichetta">Argomenti:</div>
                {{
                  products.getCatProdsStrByCatProds(
                    myproduct.productInfo.idCatProds
                  )
                }}
              </div>
            </div>
            <div class="row">
              <div class="boxtitleval">
                <div class="etichetta">Prezzo:</div>
                <CMyValueDb :editOn="modifOn" :title="t('catalogo.prezzo')" table="arrvariazioni" :id="myproduct._id"
                  :rec="myproduct" mykey="price" debounce="1000" :save="updateproductmodif()"
                  :type="costanti.FieldType.number">
                </CMyValueDb>
              </div>
              <div class="boxtitleval">
                <div class="etichetta">Prezzo Scontato:</div>
                <CMyValueDb :editOn="modifOn" :title="t('catalogo.prezzo_scontato')" table="arrvariazioni"
                  :id="myproduct._id" :rec="myproduct" mykey="sale_price" debounce="1000" :save="updateproductmodif()"
                  :type="costanti.FieldType.number">
                </CMyValueDb>
              </div>
            </div>
            <div class="row">
              <div class="boxtitleval">
                <div class="etichetta">Descrizione breve macro:</div>
                <CMyValueDb :editOn="modifOn" :title="t('catalogo.descrizione_breve_macro')" table="productinfos"
                  :id="myproduct.productInfo._id" :rec="myproduct.productInfo" mykey="descrizione_breve_macro"
                  debounce="1000" :save="updateproductmodif()" :type="costanti.FieldType.string">
                </CMyValueDb>
              </div>
              <div class="boxtitleval">
                <div class="etichetta">Link a gruppomacro.com:</div>
                <CMyValueDb :editOn="modifOn" :title="t('catalogo.link_macro')" table="productinfos"
                  :id="myproduct.productInfo._id" :rec="myproduct.productInfo" mykey="link_macro" debounce="1000"
                  :save="updateproductmodif()" :type="costanti.FieldType.string">
                </CMyValueDb>
              </div>
            </div>
            <div class="row bg-blue-4">
              <div class="etichetta">Fatturati:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="totFat" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
              <div class="etichetta">Fatturati Ultimi 3 Mese:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="fatLast3M" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
              <div class="etichetta">Venduti:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="totVen" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
              <div class="etichetta">Venduti Ultimi 3 Mesi:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="vLast3M" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
              <div class="etichetta">Venduti Ultimi 6 Mesi:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="vLast6M" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
              <div class="etichetta">Venduti Ultimo Anno:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="vLastY" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
              <CLabel :value="myproduct.indiceRanking" label="N° in Classifica:" />

              <div class="etichetta">3 Mesi:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="rank3M" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
              <div class="etichetta">6 Mesi:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="rank6M" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
              <div class="etichetta">1 Anno:</div>
              <CMyValueDb :editOn="modifOn" table="productinfos" :id="myproduct.productInfo._id"
                :rec="myproduct.productInfo" mykey="rank1Y" debounce="1000" :save="updateproductmodif()"
                :type="costanti.FieldType.number">
              </CMyValueDb>
            </div>
          </div>
        </q-card-section>
      </q-card>
    </q-dialog>
    <q-dialog v-if="visufromgm && myproduct" v-model="visufromgm">
      <q-card class="dialog_card">
        <q-toolbar class="bg-primary text-white">
          <q-toolbar-title> Visu </q-toolbar-title>
          <q-btn flat round color="white" icon="close" v-close-popup></q-btn>
        </q-toolbar>
        <q-card-section class="q-pa-xs inset-shadow">
          <CViewTable :options="{
            nameTable: 'T_Web_Articoli',
            campispeciali: true,
            numrec: 100,
            where: 'T.IdArticolo =' + myproduct.productInfo.sku,
            showQtaDisponibile,
            outhtml: true,
          }">
          </CViewTable>
        </q-card-section>
      </q-card>
    </q-dialog>
    <q-dialog v-if="updatefromgm && myproduct" v-model="updatefromgm">
      <q-card class="dialog_card">
        <q-toolbar class="bg-primary text-white">
          <q-toolbar-title> Aggiorna da GM: </q-toolbar-title>
          <q-btn flat round color="white" icon="close" v-close-popup></q-btn>
        </q-toolbar>
        <q-card-section class="q-pa-xs inset-shadow">
          <q-inner-loading id="spinner" :showing="loading">
            <q-spinner-tail color="primary" size="4em"> </q-spinner-tail>
          </q-inner-loading>
          <br />
          Valore: {{ field_updated_fromGM }}
          <br />
        </q-card-section>
      </q-card>
    </q-dialog>
  </div>
</template>

<script lang="ts" src="./CCatalogoCard.ts">
</script>

<style lang="scss" scoped>
@import "./CCatalogoCard.scss";
</style>
