diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index d5d8e2a91..fa7761c5f 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -10,6 +10,7 @@ import VnPaginate from 'components/ui/VnPaginate.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; import SkeletonTable from 'components/ui/SkeletonTable.vue'; import { tMobile } from 'src/composables/tMobile'; +import VnSubToolbar from './ui/VnSubToolbar.vue'; const { push } = useRouter(); const quasar = useQuasar(); @@ -67,7 +68,7 @@ const $props = defineProps({ default: '', description: 'It is used for redirect on click "save and continue"', }, - hasSubtoolbar: { + hasSubToolbar: { type: Boolean, default: true, }, @@ -313,8 +314,11 @@ watch(formUrl, async () => { > - - + + { { const components = computed(() => $props.components ?? defaultComponents); - + ({ card: false, table: false }), + }, }); const { t } = useI18n(); const stateStore = useStateStore(); @@ -84,11 +88,13 @@ const tableModes = [ icon: 'view_column', title: t('table view'), value: TABLE_MODE, + disable: $props.disableOption?.table, }, { icon: 'grid_view', title: t('grid view'), value: DEFAULT_MODE, + disable: $props.disableOption?.card, }, ]; @@ -232,7 +238,7 @@ defineExpose({ :search-url="searchUrl" :disable-infinite-scroll="mode == TABLE_MODE" @save-changes="reload" - :has-subtoolbar="$attrs['hasSubtoolbar'] ?? isEditable" + :has-sub-toolbar="$attrs['hasSubToolbar'] ?? isEditable" > diff --git a/src/components/common/VnComponent.vue b/src/components/common/VnComponent.vue index 318b5ee5f..fccc0c573 100644 --- a/src/components/common/VnComponent.vue +++ b/src/components/common/VnComponent.vue @@ -12,7 +12,7 @@ const $props = defineProps({ default: () => {}, }, value: { - type: [Object, Number, String], + type: [Object, Number, String, Boolean], default: () => {}, }, }); diff --git a/src/components/ui/VnSubToolbar.vue b/src/components/ui/VnSubToolbar.vue index 8c86c056a..df6fcbcb7 100644 --- a/src/components/ui/VnSubToolbar.vue +++ b/src/components/ui/VnSubToolbar.vue @@ -1,6 +1,7 @@ diff --git a/src/css/app.scss b/src/css/app.scss index f34b1358b..27ed65534 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -5,6 +5,7 @@ body.body--light { --font-color: black; --vn-section-color: #e0e0e0; + --vn-section-hover-color: #b9b9b9; --vn-page-color: #ffffff; --vn-text-color: var(--font-color); --vn-label-color: #5f5f5f; @@ -19,6 +20,7 @@ body.body--light { body.body--dark { --vn-page-color: #222; --vn-section-color: #3d3d3d; + --vn-section-hover-color: #747474; --vn-text-color: white; --vn-label-color: #a8a8a8; --vn-accent-color: #424242; @@ -71,8 +73,9 @@ select:-webkit-autofill { .bg-vn-section-color { background-color: var(--vn-section-color); } -.bg-hover { - background-color: #666666; + +.bg-vn-hover { + background-color: var(--vn-section-hover-color); } .color-vn-label { @@ -183,8 +186,6 @@ select:-webkit-autofill { justify-content: center; } -/* q-notification row items-stretch q-notification--standard bg-negative text-white */ - .q-card, .q-table, .q-table__bottom, diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 91d46a76e..bb7b07478 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -90,6 +90,7 @@ globals: send: Send code: Code pageTitles: + logIn: Login summary: Summary basicData: Basic data log: Logs @@ -263,8 +264,6 @@ login: loginError: Invalid username or password fieldRequired: This field is required twoFactorRequired: Two-factor verification required - pageTitles: - logIn: Login twoFactor: code: Code validate: Validate @@ -1012,6 +1011,19 @@ wagon: maxWagonHeight: 'The maximum height of the wagon is ' uncompleteTrays: There are incomplete trays route: + pageTitles: + agency: Agency List + routes: Routes + cmrsList: CMRs list + RouteList: List + routeCreate: New route + basicData: Basic Data + summary: Summary + RouteRoadmap: Roadmaps + RouteRoadmapCreate: Create roadmap + tickets: Tickets + log: Log + autonomous: Autonomous cmr: list: results: results diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 63c698160..3435396aa 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -90,6 +90,7 @@ globals: send: Enviar code: Código pageTitles: + logIn: Inicio de sesión summary: Resumen basicData: Datos básicos log: Historial @@ -264,8 +265,6 @@ login: loginError: Nombre de usuario o contraseña incorrectos fieldRequired: Este campo es obligatorio twoFactorRequired: Verificación de doble factor requerida - pageTitles: - logIn: Inicio de sesión twoFactor: code: Código validate: Validar @@ -1002,7 +1001,7 @@ route: list: results: resultados cmrFk: Id CMR - hasCmrDms: Adjuntado en gestdoc + hasCmrDms: Gestdoc 'true': Sí 'false': 'No' ticketFk: Id ticket diff --git a/src/pages/Agency/AgencyList.vue b/src/pages/Agency/AgencyList.vue deleted file mode 100644 index ec6506ba0..000000000 --- a/src/pages/Agency/AgencyList.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - es: - isOwn: Tiene propietario - isAnyVolumeAllowed: Permite cualquier volumen - Search agency: Buscar agencia - You can search by name: Puedes buscar por nombre - en: - isOwn: Has owner - isAnyVolumeAllowed: Allows any volume - diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue index 805795522..6f37544e8 100644 --- a/src/pages/Customer/Card/CustomerBasicData.vue +++ b/src/pages/Customer/Card/CustomerBasicData.vue @@ -69,7 +69,7 @@ const filterOptions = { { :text="t('customer.summary.basicData')" /> - + diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index 32980bc29..58aaf2bf0 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -38,7 +38,7 @@ const columns = computed(() => [ }, { align: 'left', - label: t('customer.extendedList.tableVisibleColumns.name'), + label: t('globals.name'), name: 'name', isTitle: true, create: true, @@ -408,6 +408,7 @@ function handleLocation(data, location) { default-mode="table" redirect="customer" auto-load + :disable-option="{ card: true }" > +import { computed } from 'vue'; +import { useRouter } from 'vue-router'; +import { useI18n } from 'vue-i18n'; +import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; +import VnTable from 'components/VnTable/VnTable.vue'; + +const { t } = useI18n(); +const router = useRouter(); +function navigate(id) { + router.push({ path: `/agency/${id}` }); +} +const exprBuilder = (param, value) => { + if (!value) return; + if (param !== 'search') return; + if (!isNaN(value)) return { id: value }; + + return { name: { like: `%${value}%` } }; +}; + +const columns = computed(() => [ + { + align: 'left', + name: 'id', + label: 'Id', + chip: { + condition: () => true, + }, + isId: true, + }, + { + align: 'left', + label: t('globals.name'), + name: 'name', + isTitle: true, + }, + { + align: 'left', + label: t('isOwn'), + name: 'isOwn', + component: 'checkbox', + cardVisible: true, + }, + { + align: 'left', + label: t('isAnyVolumeAllowed'), + name: 'isAnyVolumeAllowed', + component: 'checkbox', + cardVisible: true, + disable: true, + }, + { + align: 'right', + label: '', + name: 'tableActions', + actions: [ + { + title: t('Client ticket list'), + icon: 'preview', + action: (row) => navigate(row.id), + }, + ], + }, +]); + + + + + + + es: + isOwn: Tiene propietario + isAnyVolumeAllowed: Permite cualquier volumen + Search agency: Buscar agencia + You can search by name: Puedes buscar por nombre + en: + isOwn: Has owner + isAnyVolumeAllowed: Allows any volume + diff --git a/src/pages/Agency/Card/AgencyBasicData.vue b/src/pages/Route/Agency/Card/AgencyBasicData.vue similarity index 100% rename from src/pages/Agency/Card/AgencyBasicData.vue rename to src/pages/Route/Agency/Card/AgencyBasicData.vue diff --git a/src/pages/Agency/Card/AgencyCard.vue b/src/pages/Route/Agency/Card/AgencyCard.vue similarity index 82% rename from src/pages/Agency/Card/AgencyCard.vue rename to src/pages/Route/Agency/Card/AgencyCard.vue index 6b2296df3..e1eebabf7 100644 --- a/src/pages/Agency/Card/AgencyCard.vue +++ b/src/pages/Route/Agency/Card/AgencyCard.vue @@ -1,5 +1,5 @@ diff --git a/src/pages/Agency/Card/AgencyDescriptor.vue b/src/pages/Route/Agency/Card/AgencyDescriptor.vue similarity index 100% rename from src/pages/Agency/Card/AgencyDescriptor.vue rename to src/pages/Route/Agency/Card/AgencyDescriptor.vue diff --git a/src/pages/Agency/Card/AgencyLog.vue b/src/pages/Route/Agency/Card/AgencyLog.vue similarity index 100% rename from src/pages/Agency/Card/AgencyLog.vue rename to src/pages/Route/Agency/Card/AgencyLog.vue diff --git a/src/pages/Agency/Card/AgencyModes.vue b/src/pages/Route/Agency/Card/AgencyModes.vue similarity index 100% rename from src/pages/Agency/Card/AgencyModes.vue rename to src/pages/Route/Agency/Card/AgencyModes.vue diff --git a/src/pages/Agency/Card/AgencySummary.vue b/src/pages/Route/Agency/Card/AgencySummary.vue similarity index 81% rename from src/pages/Agency/Card/AgencySummary.vue rename to src/pages/Route/Agency/Card/AgencySummary.vue index f9a1c5ea0..71a6d1066 100644 --- a/src/pages/Agency/Card/AgencySummary.vue +++ b/src/pages/Route/Agency/Card/AgencySummary.vue @@ -18,12 +18,10 @@ const entityId = computed(() => $props.id || useRoute().params.id); {{ agency.name }} - - - + diff --git a/src/pages/Route/Cmr/CmrFilter.vue b/src/pages/Route/Cmr/CmrFilter.vue index 32040ddd6..bea58b2d8 100644 --- a/src/pages/Route/Cmr/CmrFilter.vue +++ b/src/pages/Route/Cmr/CmrFilter.vue @@ -154,7 +154,7 @@ const warehouses = ref(); es: params: cmrFk: Id cmr - hasCmrDms: Adjuntado en gestdoc + hasCmrDms: Gestdoc ticketFk: Id ticket country: País clientFk: Id cliente diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue index 327b37ac5..74a070cbf 100644 --- a/src/pages/Route/Cmr/CmrList.vue +++ b/src/pages/Route/Cmr/CmrList.vue @@ -12,6 +12,8 @@ import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy import RightMenu from 'src/components/common/RightMenu.vue'; import { useStateStore } from 'src/stores/useStateStore'; +import VnTable from 'components/VnTable/VnTable.vue'; + const { t } = useI18n(); const { getTokenMultimedia } = useSession(); const token = getTokenMultimedia(); @@ -107,88 +109,15 @@ function downloadPdfs() { } - - - - - - - - - - - - - - {{ `${rows.length} ${t('route.cmr.list.results')}` }} - - - - - - - - - - - {{ value }} - - - - - - {{ value }} - - - - - - {{ warehouses.find(({ id }) => id === value)?.name }} - - - - - - - - {{ t('route.cmr.list.viewCmr') }} - - - - - - - - - - - - {{ t('route.cmr.list.downloadCmrs') }} - - - +