diff --git a/src/components/PaginateData.vue b/src/components/ui/VnPaginate.vue similarity index 100% rename from src/components/PaginateData.vue rename to src/components/ui/VnPaginate.vue diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue index bc4ef7ceb..eed8b9bb2 100644 --- a/src/pages/Claim/Card/ClaimLines.vue +++ b/src/pages/Claim/Card/ClaimLines.vue @@ -6,12 +6,13 @@ import { useQuasar } from 'quasar'; import { useRoute } from 'vue-router'; import { useArrayData } from 'src/composables/useArrayData'; import { useStateStore } from 'stores/useStateStore'; -import Paginate from 'src/components/PaginateData.vue'; +import VnPaginate from 'src/components/ui/VnPaginate.vue'; import FetchData from 'components/FetchData.vue'; import VnConfirm from 'src/components/ui/VnConfirm.vue'; import { toDate, toCurrency, toPercentage } from 'src/filters'; import VnDiscount from 'components/common/vnDiscount.vue'; +import ClaimLinesImport from './ClaimLinesImport.vue'; const quasar = useQuasar(); const route = useRoute(); @@ -165,6 +166,14 @@ async function remove({ id }) { message: t('globals.rowRemoved'), }); } + +function showImportDialog() { + quasar + .dialog({ + component: ClaimLinesImport, + }) + .onOk(() => {}); +} @@ -244,30 +271,6 @@ async function remove({ id }) { :data="{ saleFk: row.sale.id, rowIndex: rowIndex }" @on-update="onUpdateDiscount" /> - - - + @@ -295,7 +298,7 @@ async function remove({ id }) { to="#actions-prepend" >
- + {{ t('globals.add') }} diff --git a/src/pages/Claim/Card/ClaimLinesImport.vue b/src/pages/Claim/Card/ClaimLinesImport.vue new file mode 100644 index 000000000..14ba6d3c9 --- /dev/null +++ b/src/pages/Claim/Card/ClaimLinesImport.vue @@ -0,0 +1,121 @@ + + + + + + diff --git a/src/pages/Claim/Card/ClaimLog.vue b/src/pages/Claim/Card/ClaimLog.vue index 7a72a5e53..c48112741 100644 --- a/src/pages/Claim/Card/ClaimLog.vue +++ b/src/pages/Claim/Card/ClaimLog.vue @@ -3,7 +3,7 @@ import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import { useSession } from 'src/composables/useSession'; import { useStateStore } from 'stores/useStateStore'; -import Paginate from 'src/components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; import ClaimLogFilter from './ClaimLogFilter.vue'; import { toDate } from 'src/filters'; diff --git a/src/pages/Claim/Card/ClaimRma.vue b/src/pages/Claim/Card/ClaimRma.vue index 2c0fdf428..8afe641de 100644 --- a/src/pages/Claim/Card/ClaimRma.vue +++ b/src/pages/Claim/Card/ClaimRma.vue @@ -6,7 +6,7 @@ import { useQuasar } from 'quasar'; import { useRoute } from 'vue-router'; import { useArrayData } from 'src/composables/useArrayData'; import { useStateStore } from 'stores/useStateStore'; -import Paginate from 'src/components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; import FetchData from 'components/FetchData.vue'; import VnConfirm from 'src/components/ui/VnConfirm.vue'; diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index 05c074ee0..a5a612c87 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -4,7 +4,7 @@ import { useRouter } from 'vue-router'; import { useQuasar } from 'quasar'; import { useStateStore } from 'stores/useStateStore'; import { toDate } from 'filters/index'; -import Paginate from 'components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue'; import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; diff --git a/src/pages/Claim/ClaimRmaList.vue b/src/pages/Claim/ClaimRmaList.vue index dcb586e73..1abf7395d 100644 --- a/src/pages/Claim/ClaimRmaList.vue +++ b/src/pages/Claim/ClaimRmaList.vue @@ -3,7 +3,7 @@ import { ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useQuasar } from 'quasar'; import axios from 'axios'; -import Paginate from 'src/components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; import { useArrayData } from 'src/composables/useArrayData'; import VnConfirm from 'src/components/ui/VnConfirm.vue'; diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index faa960512..9fab3a6c9 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -3,7 +3,7 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import { useQuasar } from 'quasar'; import { useStateStore } from 'stores/useStateStore'; -import Paginate from 'src/components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; import CustomerSummaryDialog from './Card/CustomerSummaryDialog.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import CustomerFilter from './CustomerFilter.vue'; diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index b05376079..54a2ccd92 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import { useQuasar } from 'quasar'; import { useStateStore } from 'stores/useStateStore'; -import Paginate from 'src/components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; import InvoiceOutSummaryDialog from './Card/InvoiceOutSummaryDialog.vue'; import { toDate, toCurrency } from 'src/filters/index'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index b8cf78181..afb55b208 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'; import { useQuasar } from 'quasar'; import { useRouter } from 'vue-router'; import { useStateStore } from 'stores/useStateStore'; -import Paginate from 'src/components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; import { toDate, toDateString, toCurrency } from 'src/filters/index'; import TicketSummaryDialog from './Card/TicketSummaryDialog.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index 8b0d9392c..bb925b648 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -3,7 +3,7 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import { useQuasar } from 'quasar'; import { useStateStore } from 'stores/useStateStore'; -import Paginate from 'src/components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; import WorkerSummaryDialog from './Card/WorkerSummaryDialog.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; import WorkerFilter from './WorkerFilter.vue'; diff --git a/test/vitest/__tests__/components/Paginate.spec.js b/test/vitest/__tests__/components/Paginate.spec.js index 5a6b08712..723c98476 100644 --- a/test/vitest/__tests__/components/Paginate.spec.js +++ b/test/vitest/__tests__/components/Paginate.spec.js @@ -1,6 +1,6 @@ import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; import { createWrapper, axios } from 'app/test/vitest/helper'; -import Paginate from 'components/PaginateData.vue'; +import Paginate from 'src/components/ui/VnPaginate.vue'; describe('Paginate', () => { const expectedUrl = '/api/customers';