@mythpe/quasar-ui-qui 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -390,9 +390,9 @@ const hasFilterDialog = computed<boolean>(() => !!slots.filter)
390
390
 
391
391
  const isUpdateMode = ref<boolean>(!1)
392
392
  const formMode = computed<'update' | 'store'>(() => isUpdateMode.value ? 'update' : 'store')
393
- const isSingleSelectedItem = computed<boolean>(() => tableOptions.selected.length === 1)
394
- const firstSelectedItem = computed(() => tableOptions.selected[0] as MDtItem)
395
- const hasSelectedItem = computed<boolean>(() => tableOptions.selected.length > 0)
393
+ const isSingleSelectedItem = computed<boolean>(() => selected.value.length === 1)
394
+ const firstSelectedItem = computed(() => selected.value[0] as MDtItem)
395
+ const hasSelectedItem = computed<boolean>(() => selected.value.length > 0)
396
396
 
397
397
  /* Titles */
398
398
  const getShowTitle = computed(() => {
@@ -403,8 +403,9 @@ const getShowTitle = computed(() => {
403
403
  return __('show_details')
404
404
  })
405
405
  const getFormTitle = computed(() => {
406
- const name = serviceName.value && typeof serviceName.value !== 'function' ? __(`choice.${pascalCase(pluralize(serviceName.value.split(
407
- '/').pop()))}`, 1) : ''
406
+ const name = serviceName.value && typeof serviceName.value !== 'function' ? __(`choice.${pascalCase(pluralize(
407
+ serviceName.value.split(
408
+ '/').pop()))}`, 1) : ''
408
409
  return __(`replace.${formMode.value}`, { name })
409
410
  })
410
411
  const isGrid = computed(() => {
@@ -426,8 +427,8 @@ const getMythApiServicesSchema = (): MDtMythApiServicesSchema => {
426
427
  }
427
428
  return c
428
429
  }
429
- const updateSelectedItems = (selected: MDtItem[]) => {
430
- tableOptions.selected = selected
430
+ const updateSelectedItems = (items: MDtItem[]) => {
431
+ selected.value = items as any
431
432
  }
432
433
  const onScroll = ({ index, to }: any) => {
433
434
  if (index && to && index === to) {
@@ -438,10 +439,10 @@ const loadMore = () => {
438
439
  nextTick(() => {
439
440
  fetchDatatableItems({
440
441
  pagination: {
441
- ...tableOptions.pagination,
442
- page: (tableOptions.pagination.page ?? 0) + 1
442
+ ...pagination.value,
443
+ page: (pagination.value.page ?? 0) + 1
443
444
  },
444
- filter: tableOptions.search
445
+ filter: search.value
445
446
  })
446
447
  })
447
448
  }
@@ -456,7 +457,7 @@ const refreshNoUpdate = (done?: () => void) => {
456
457
  nextTick(() => {
457
458
  fetchDatatableItems({
458
459
  pagination: pagination.value,
459
- filter: tableOptions.search
460
+ filter: search.value
460
461
  })
461
462
  if (done) {
462
463
  done()
@@ -505,8 +506,8 @@ const getDatatableParams = ({
505
506
  if (filter) {
506
507
  params.search = filter
507
508
  }
508
- if (Object.keys(tableOptions.filter).length > 0) {
509
- const TempFilter = { ...tableOptions.filter } as any
509
+ if (Object.keys(filterForm.value).length > 0) {
510
+ const TempFilter = { ...filterForm.value } as any
510
511
  for (const fKey in TempFilter) {
511
512
  if (lodash.isArray(TempFilter[fKey])) {
512
513
  TempFilter[fKey] = TempFilter[fKey].map((elm: any) => {
@@ -525,8 +526,8 @@ const getDatatableParams = ({
525
526
  }
526
527
  }
527
528
  }
528
- // console.log(JSON.stringify(tableOptions.filter))
529
- // params.filter = tableOptions.filter
529
+ // console.log(JSON.stringify(filterForm.value))
530
+ // params.filter = filterForm.value
530
531
  // console.log(TempFilter)
531
532
  params.filter = TempFilter
532
533
  }
@@ -546,12 +547,12 @@ const getDatatableParams = ({
546
547
  return { ...params, ...merge }
547
548
  }
548
549
  const fetchDatatableItems = (opts: FetchRowsArgs = {}) => {
549
- if (props.endReach && tableOptions.meta.last_page && tableOptions.pagination.page >= tableOptions.meta.last_page) {
550
+ if (props.endReach && meta.value.last_page && pagination.value.page >= meta.value.last_page) {
550
551
  return
551
552
  }
552
- if (tableOptions.loading || !serviceName.value) return
553
- tableOptions.loading = !0
554
- tableOptions.selected = []
553
+ if (loading.value || !serviceName.value) return
554
+ loading.value = !0
555
+ selected.value = []
555
556
  nextTick(() => {
556
557
  const params = getDatatableParams(opts)
557
558
  const requestWith = getRequestWith('withIndex')
@@ -589,7 +590,7 @@ const fetchDatatableItems = (opts: FetchRowsArgs = {}) => {
589
590
  }
590
591
  })
591
592
  .finally(() => {
592
- tableOptions.loading = !1
593
+ loading.value = !1
593
594
  })
594
595
  })
595
596
  }
@@ -602,16 +603,16 @@ const exportData = (type: MDtExportOptions) => {
602
603
  const toBLob = exportToBlob.value === !0 || exportToBlob.value === type
603
604
  const headerItems = getHeaders.value.filter(e => e?.field !== props.controlKey && visibleHeaders.value.indexOf(e.name) !== -1)
604
605
  const data = getDatatableParams({
605
- pagination: tableOptions.pagination,
606
- filter: tableOptions.search
606
+ pagination: pagination.value,
607
+ filter: search.value
607
608
  }, {
608
609
  indexType: type,
609
610
  fdt: 'e',
610
611
  toUrl: toBLob === !0 ? !1 : exportToBlob.value !== type,
611
612
  headerItems
612
613
  })
613
- if (tableOptions.selected.length > 0) {
614
- data.ids = tableOptions.selected.map((e: any) => e.id)
614
+ if (selected.value.length > 0) {
615
+ data.ids = selected.value.map((e: any) => e.id)
615
616
  }
616
617
  // console.log(3)
617
618
  const config: AxiosRequestConfig = {}
@@ -644,7 +645,7 @@ const exportData = (type: MDtExportOptions) => {
644
645
  loading.value = !1
645
646
  })
646
647
  }
647
- if (!tableOptions.selected.length) {
648
+ if (!selected.value.length) {
648
649
  confirmMessage(__('messages.export_all')).onOk(() => ex())
649
650
  } else {
650
651
  ex()
@@ -659,17 +660,17 @@ const openDialogTimeout = 100
659
660
  const openFilterDialog = () => {
660
661
  resetDialogForm({ values: {}, errors: {} }, { force: !0 })
661
662
  nextTick(() => {
662
- tempFilterForm.value = { ...tableOptions.filter }
663
+ tempFilterForm.value = { ...filterForm.value }
663
664
  dialogs.filter = !0
664
665
  })
665
666
  }
666
667
  const saveFilterDialog = () => {
667
668
  dialogs.filter = !1
668
- nextTick(() => (filterForm.value = { ...tableOptions.tempFilter }))
669
+ nextTick(() => (filterForm.value = { ...tempFilterForm.value }))
669
670
  }
670
671
  const closeFilterDialog = () => {
671
672
  dialogs.filter = !1
672
- tempFilterForm.value = { ...tableOptions.filter }
673
+ tempFilterForm.value = { ...filterForm.value }
673
674
  }
674
675
  const onRemoveFilter = (key: string | number) => {
675
676
  const filter = filterForm.value
@@ -683,7 +684,7 @@ const onRemoveFilter = (key: string | number) => {
683
684
  }
684
685
  const updateFilterOptions = (data: Record<string, any>) => {
685
686
  filterForm.value = {
686
- ...tableOptions.filter,
687
+ ...filterForm.value,
687
688
  ...data
688
689
  }
689
690
  }
@@ -844,6 +845,9 @@ const updateDatatableItem = (i: MDtItem, index?: MDtItemIndex) => {
844
845
  getRows.value[findIndex] = item
845
846
  }
846
847
  }
848
+ if (selected.value.length === 1) {
849
+ selected.value = [item]
850
+ }
847
851
  }
848
852
  }
849
853
  const removeDtItem = (i: MDtItem | number) => {
@@ -897,13 +901,18 @@ const onSuccess: SubmissionHandler = async (form) => {
897
901
  requestWith: getRequestWith(isUpdateMode.value ? 'withUpdate' : 'withStore') || undefined
898
902
  }
899
903
  }
900
- const method = async () => isUpdateMode.value ? await apiServices.update(dialogs.item?.id || '', form, _conf) : await apiServices.store(form, _conf)
904
+ const method = async () => isUpdateMode.value ? await apiServices.update(dialogs.item?.id || '',
905
+ form,
906
+ _conf) : await apiServices.store(form, _conf)
901
907
  try {
902
908
  const { _data, _message, _success }: any = await method()
903
909
  _message && alertSuccess(_message)
904
910
  if (_success) {
905
911
  if (isUpdateMode.value) {
906
- _data && updateDatatableItem(_data, dialogs.index)
912
+ if (_data) {
913
+ updateDatatableItem(_data, dialogs.index)
914
+ updateSelectedItems([_data])
915
+ }
907
916
  } else {
908
917
  setTimeout(() => refresh(), openDialogTimeout)
909
918
  }
@@ -937,7 +946,7 @@ const onDeleteItem = (i: MDtItem, index: number) => {
937
946
  if (loading.value || !item.value?.id) {
938
947
  return
939
948
  }
940
- tableOptions.hasAction = !0
949
+ hasAction.value = !0
941
950
  confirmMessage(__('messages.confirm_delete')).onOk(async () => {
942
951
  loading.value = !0
943
952
  try {
@@ -946,8 +955,8 @@ const onDeleteItem = (i: MDtItem, index: number) => {
946
955
  _message && alertSuccess(_message)
947
956
  }
948
957
  if (_success) {
949
- if (tableOptions.pagination.rowsNumber !== undefined) {
950
- --tableOptions.pagination.rowsNumber
958
+ if (pagination.value.rowsNumber !== undefined) {
959
+ --pagination.value.rowsNumber
951
960
  selected.value = []
952
961
  }
953
962
  removeDtItem(index)
@@ -958,30 +967,30 @@ const onDeleteItem = (i: MDtItem, index: number) => {
958
967
  loading.value = !1
959
968
  }
960
969
  }).onDismiss(() => {
961
- tableOptions.hasAction = !1
970
+ hasAction.value = !1
962
971
  })
963
972
  }
964
973
  const deleteSelectionItem = () => {
965
- if (!tableOptions.selected.length) return
966
- if (loading.value || !tableOptions.selected.length) {
974
+ if (!selected.value.length) return
975
+ if (loading.value || !selected.value.length) {
967
976
  return
968
977
  }
969
- if (tableOptions.selected.length === 1) {
970
- const dtItem = tableOptions.selected[0] as MDtItem
978
+ if (selected.value.length === 1) {
979
+ const dtItem = selected.value[0] as MDtItem
971
980
  const index = getRows.value.findIndex((e: any) => parseInt(e.id) === parseInt(dtItem?.id?.toString() || ''))
972
981
  return onDeleteItem(dtItem, index)
973
982
  }
974
983
  if (!props.multiDestroy) {
975
984
  return
976
985
  }
977
- tableOptions.hasAction = !0
986
+ hasAction.value = !0
978
987
  confirmMessage(__('messages.confirm_delete')).onOk(async () => {
979
988
  loading.value = !0
980
989
  try {
981
990
  const {
982
991
  _message,
983
992
  _success
984
- } = await getMythApiServicesSchema().destroyAll(tableOptions.selected.map((e: MDtItem) => e.id))
993
+ } = await getMythApiServicesSchema().destroyAll(selected.value.map((e: MDtItem) => e.id))
985
994
  if (!hideAutoMessage.value && _success && _message) {
986
995
  _message && alertSuccess(_message)
987
996
  }
@@ -996,7 +1005,7 @@ const deleteSelectionItem = () => {
996
1005
  selected.value = []
997
1006
  }
998
1007
  }).onDismiss(() => {
999
- tableOptions.hasAction = !1
1008
+ hasAction.value = !1
1000
1009
  })
1001
1010
  }
1002
1011
  const logoutDatatable = () => {
@@ -1128,7 +1137,7 @@ watch(loading, v => {
1128
1137
  $q.loading.hide()
1129
1138
  }
1130
1139
  }
1131
- tableOptions.hasAction = v
1140
+ hasAction.value = v
1132
1141
  })
1133
1142
  watch([filterForm, () => $q.lang.nativeName], () => refreshNoUpdate(), { deep: !0 })
1134
1143
  watch(formDialogModel, (v) => {
@@ -1218,6 +1227,20 @@ const getSlots = computed(() => {
1218
1227
  const keys = Object.keys(componentSlots || {})
1219
1228
  return keys.filter(e => !skipSlots.includes(e))
1220
1229
  })
1230
+ // contextBtn.multiClick && selected.value.length > 1 ?
1231
+ // contextBtn.multiClick(selected.value) : (
1232
+ // contextBtn.click ? contextBtn.click(selected.value[0],0) : undefined
1233
+ // )
1234
+ const onClickTopMenu = (item: any) => {
1235
+ if (item.multiClick && selected.value.length > 1) {
1236
+ item.multiClick(selected.value)
1237
+ return
1238
+ }
1239
+
1240
+ if (item.click) {
1241
+ item.click(selected.value[0], 0)
1242
+ }
1243
+ }
1221
1244
  defineOptions({
1222
1245
  name: 'MDatatable',
1223
1246
  inheritAttrs: !1
@@ -1273,15 +1296,15 @@ defineOptions({
1273
1296
  >
1274
1297
  <q-table
1275
1298
  ref="table"
1276
- v-model:fullscreen="tableOptions.fullscreen"
1299
+ v-model:fullscreen="fullscreen"
1277
1300
  v-model:pagination="pagination"
1278
1301
  v-model:selected="selected"
1279
1302
  :class="`m--datatable ` + ($q.screen.lt.md ? 'm--datatable-grid' : '')"
1280
1303
  :columns="getHeaders"
1281
- :filter="tableOptions.search"
1304
+ :filter="search"
1282
1305
  :grid="isGrid"
1283
1306
  :hide-pagination="endReach"
1284
- :loading="tableOptions.loading"
1307
+ :loading="loading"
1285
1308
  :rows="getRows"
1286
1309
  :rows-per-page-options="getRowsPerPageOptions"
1287
1310
  :selection="getShowSelection ? (multiSelection ? 'multiple' : 'single') : 'none'"
@@ -1492,7 +1515,7 @@ defineOptions({
1492
1515
  />
1493
1516
  <MInput
1494
1517
  v-if="!hideSearch && !dialogs.form"
1495
- v-model="tableOptions.search"
1518
+ v-model="search"
1496
1519
  :debounce="searchDebounce"
1497
1520
  :dense="dense === undefined ? (pluginOptions.datatable?.dense !== undefined ? pluginOptions.datatable?.dense : !0) : dense"
1498
1521
  :placeholder="searchPlaceholder"
@@ -1505,7 +1528,7 @@ defineOptions({
1505
1528
  >
1506
1529
  <template #prepend>
1507
1530
  <q-icon
1508
- v-if="!tableOptions.search"
1531
+ v-if="!search"
1509
1532
  name="ion-ios-search"
1510
1533
  >
1511
1534
  <q-tooltip class="m--dt-btn-tooltip">
@@ -1516,7 +1539,7 @@ defineOptions({
1516
1539
  v-else
1517
1540
  class="cursor-pointer"
1518
1541
  name="ion-ios-close"
1519
- @click="tableOptions.search = ''"
1542
+ @click="search = ''"
1520
1543
  >
1521
1544
  <q-tooltip class="m--dt-btn-tooltip">
1522
1545
  {{ __('myth.datatable.searchInputClear') }}
@@ -1573,7 +1596,7 @@ defineOptions({
1573
1596
  no-caps
1574
1597
  style="min-width: 68px"
1575
1598
  unelevated
1576
- @click="tableOptions.search ? refresh() : undefined"
1599
+ @click="search ? refresh() : undefined"
1577
1600
  />
1578
1601
  </MRow>
1579
1602
  </MModalMenu>
@@ -1654,7 +1677,7 @@ defineOptions({
1654
1677
  >
1655
1678
  <slot
1656
1679
  :dt="datatableItemsScope"
1657
- :filter="tableOptions.tempFilter"
1680
+ :filter="tempFilterForm"
1658
1681
  :form="useFormContext"
1659
1682
  :index="dialogItemIndex"
1660
1683
  :item="dialogItem"
@@ -1695,7 +1718,7 @@ defineOptions({
1695
1718
  <MDtBtn
1696
1719
  v-if="!noRefreshBtn"
1697
1720
  key="refresh-selection-btn"
1698
- :disable="tableOptions.loading"
1721
+ :disable="loading"
1699
1722
  icon="ion-ios-refresh"
1700
1723
  tooltip="myth.datatable.hints.refresh"
1701
1724
  v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.buttons?.refresh}"
@@ -1706,44 +1729,44 @@ defineOptions({
1706
1729
  <MDtBtn
1707
1730
  v-if="fullscreenBtn === undefined ? ( !!pluginOptions.datatable?.fullscreenBtn) : fullscreenBtn"
1708
1731
  key="fullscreen-selection-btn"
1709
- :disable="tableOptions.loading"
1710
- :icon="tableOptions.fullscreen ? 'ion-ios-contract' : 'ion-ios-desktop'"
1711
- :tooltip="`myth.datatable.${tableOptions.fullscreen ? 'exitFullscreen' : 'fullscreen'}`"
1732
+ :disable="loading"
1733
+ :icon="fullscreen ? 'ion-ios-contract' : 'ion-ios-desktop'"
1734
+ :tooltip="`myth.datatable.${fullscreen ? 'exitFullscreen' : 'fullscreen'}`"
1712
1735
  v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.buttons?.fullscreen}"
1713
- @click="tableOptions.fullscreen = !tableOptions.fullscreen"
1736
+ @click="fullscreen = !fullscreen"
1714
1737
  />
1715
1738
  <template v-if="hasSelectedItem">
1716
1739
  <MDtBtn
1717
1740
  v-if="hasUpdateBtn && isSingleSelectedItem"
1718
1741
  key="update-dt-selection-btn"
1719
- :disable="tableOptions.loading"
1742
+ :disable="loading"
1720
1743
  icon="ion-ios-create"
1721
1744
  update
1722
1745
  v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.topSelection?.btn}"
1723
- @click="openUpdateDialogNoIndex(tableOptions.selected[0] as any)"
1746
+ @click="openUpdateDialogNoIndex(selected[0] as any)"
1724
1747
  />
1725
1748
  <MDtBtn
1726
1749
  v-if="hasCloneBtn && isSingleSelectedItem"
1727
1750
  key="clone-dt-selection-btn"
1728
- :disable="tableOptions.loading"
1751
+ :disable="loading"
1729
1752
  clone
1730
1753
  tooltip="labels.clone"
1731
1754
  v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.topSelection?.btn}"
1732
- @click="onCloneItem(tableOptions.selected[0] as any)"
1755
+ @click="onCloneItem(selected[0] as any)"
1733
1756
  />
1734
1757
  <MDtBtn
1735
1758
  v-if="hasShowBtn && isSingleSelectedItem"
1736
1759
  key="show-dt-selection-btn"
1737
- :disable="tableOptions.loading"
1760
+ :disable="loading"
1738
1761
  icon="ion-ios-eye"
1739
1762
  show
1740
1763
  v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.topSelection?.btn}"
1741
- @click="openShowDialogNoIndex(tableOptions.selected[0] as any)"
1764
+ @click="openShowDialogNoIndex(selected[0] as any)"
1742
1765
  />
1743
1766
  <MDtBtn
1744
- v-if="tableOptions.selected.length > 1 ? (hasDestroyBtn && multiDestroy) : hasDestroyBtn"
1767
+ v-if="selected.length > 1 ? (hasDestroyBtn && multiDestroy) : hasDestroyBtn"
1745
1768
  key="destroy-dt-selection-btn"
1746
- :disable="!hasSelectedItem || tableOptions.loading"
1769
+ :disable="!hasSelectedItem || loading"
1747
1770
  color="negative"
1748
1771
  destroy
1749
1772
  icon="ion-ios-trash"
@@ -1755,12 +1778,10 @@ defineOptions({
1755
1778
  :key="`top-s-${i}`"
1756
1779
  >
1757
1780
  <MDtBtn
1758
- v-if="(typeof contextBtn.showIf === 'function' ? contextBtn.showIf(tableOptions.selected[0],0) : contextBtn.showIf) && ( (contextBtn.click && isSingleSelectedItem) || (contextBtn.multiClick && !isSingleSelectedItem) )"
1781
+ v-if="(typeof contextBtn.showIf === 'function' ? contextBtn.showIf(selected[0],0) : contextBtn.showIf) && ( (contextBtn.click && isSingleSelectedItem) || (contextBtn.multiClick && !isSingleSelectedItem) )"
1759
1782
  :tooltip="contextBtn.tooltip?__(contextBtn.tooltip):(contextBtn.label?__(`labels.${contextBtn.label}`):undefined)"
1760
1783
  v-bind="{...defaultTopBtnProps,...pluginOptions.dt?.topSelection?.btn,...contextBtn,...contextBtn.attr}"
1761
- @click="contextBtn.multiClick && tableOptions.selected.length > 1 ? contextBtn.multiClick(tableOptions.selected) : (
1762
- contextBtn.click ? contextBtn.click(tableOptions.selected[0],0) : undefined
1763
- )"
1784
+ @click="onClickTopMenu(contextBtn)"
1764
1785
  />
1765
1786
  </template>
1766
1787
  </template>
@@ -1802,14 +1823,14 @@ defineOptions({
1802
1823
 
1803
1824
  <!-- Filter Row -->
1804
1825
  <MRow
1805
- v-if="Object.values(tableOptions.filter).filter(e => e !== undefined && e !== null).length > 0"
1826
+ v-if="Object.values(filterForm).filter(e => e !== undefined && e !== null).length > 0"
1806
1827
  class="items-center"
1807
1828
  >
1808
1829
  <MCol col="auto">
1809
1830
  <span class="text-subtitle1 q-mr-sm">{{ __('myth.datatable.filteredBy') }}</span>
1810
1831
  </MCol>
1811
1832
  <template
1812
- v-for="(filterValue,filterKey) in tableOptions.filter"
1833
+ v-for="(filterValue,filterKey) in filterForm"
1813
1834
  :key="`filter-${filterKey}`"
1814
1835
  >
1815
1836
  <MCol
@@ -1828,7 +1849,9 @@ defineOptions({
1828
1849
  <span>
1829
1850
  {{ getHeaders.find(e => e.name === filterKey)?.label || __(`attributes.${filterKey}`) }}
1830
1851
  </span>
1831
- <span v-if="typeof filterValue === 'boolean'">: {{ __(`labels.${filterValue ? 'yes' : 'no'}`) }}</span>
1852
+ <span v-if="typeof filterValue === 'boolean'">: {{
1853
+ __(`labels.${filterValue ? 'yes' : 'no'}`)
1854
+ }}</span>
1832
1855
  <span v-else-if="typeof filterValue === 'string'">: {{ filterValue }}</span>
1833
1856
  <span
1834
1857
  v-else-if="lodash.isArray(filterValue) && !quasarHelpers.object(filterValue[0])"
@@ -2049,7 +2072,7 @@ defineOptions({
2049
2072
  name="form-title"
2050
2073
  >
2051
2074
  <q-toolbar-title>
2052
- <template v-if="tableOptions.loading && !dialogs.item">
2075
+ <template v-if="loading && !dialogs.item">
2053
2076
  <q-skeleton width="200px" />
2054
2077
  </template>
2055
2078
  <template v-else>
@@ -2083,11 +2106,11 @@ defineOptions({
2083
2106
  class="scroll m--datatable__dialog-form-container"
2084
2107
  >
2085
2108
  <MContainer
2086
- v-if="tableOptions.loading && !dialogs.item"
2109
+ v-if="loading && !dialogs.item"
2087
2110
  :fluid="!1"
2088
2111
  >
2089
2112
  <MRow
2090
- v-if="tableOptions.loading"
2113
+ v-if="loading"
2091
2114
  col
2092
2115
  >
2093
2116
  <template
@@ -2127,7 +2150,7 @@ defineOptions({
2127
2150
  <MBtn
2128
2151
  :class="{'full-width': $q.screen.lt.sm}"
2129
2152
  :label="__('myth.titles.' + (isUpdateMode ? 'save' : 'store'))"
2130
- :loading="tableOptions.loading"
2153
+ :loading="loading"
2131
2154
  color="positive"
2132
2155
  no-caps
2133
2156
  type="submit"
@@ -2136,7 +2159,7 @@ defineOptions({
2136
2159
  </slot>
2137
2160
  <MBtn
2138
2161
  v-if="$q.screen.gt.sm"
2139
- :disable="tableOptions.loading"
2162
+ :disable="loading"
2140
2163
  :label="__('myth.titles.close')"
2141
2164
  color="negative"
2142
2165
  no-caps