forked from verdnatura/salix-front
Create roadmap create page
This commit is contained in:
parent
8ffa3b7626
commit
45d7b021a6
|
@ -889,6 +889,7 @@ export default {
|
||||||
basicData: 'Basic Data',
|
basicData: 'Basic Data',
|
||||||
summary: 'Summary',
|
summary: 'Summary',
|
||||||
RouteRoadmap: 'Roadmaps',
|
RouteRoadmap: 'Roadmaps',
|
||||||
|
RouteRoadmapCreate: 'Create roadmap',
|
||||||
tickets: 'Tickets',
|
tickets: 'Tickets',
|
||||||
log: 'Log',
|
log: 'Log',
|
||||||
autonomous: 'Autonomous',
|
autonomous: 'Autonomous',
|
||||||
|
|
|
@ -943,6 +943,7 @@ export default {
|
||||||
basicData: 'Datos básicos',
|
basicData: 'Datos básicos',
|
||||||
summary: 'Resumen',
|
summary: 'Resumen',
|
||||||
RouteRoadmap: 'Troncales',
|
RouteRoadmap: 'Troncales',
|
||||||
|
RouteRoadmapCreate: 'Crear troncal',
|
||||||
tickets: 'Tickets',
|
tickets: 'Tickets',
|
||||||
log: 'Historial',
|
log: 'Historial',
|
||||||
autonomous: 'Autónomos',
|
autonomous: 'Autónomos',
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
<script setup>
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
|
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const defaultInitialData = {
|
||||||
|
etd: Date.vnNew().toISOString(),
|
||||||
|
};
|
||||||
|
const onSave = (data, response) => {
|
||||||
|
router.push({ name: 'RoadmapSummary', params: { id: response?.id } });
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<VnSubToolbar />
|
||||||
|
<FormModel
|
||||||
|
:url="null"
|
||||||
|
url-create="Roadmaps"
|
||||||
|
model="roadmap"
|
||||||
|
:observe-form-changes="false"
|
||||||
|
:auto-load="false"
|
||||||
|
:form-initial-data="defaultInitialData"
|
||||||
|
@on-data-saved="onSave"
|
||||||
|
>
|
||||||
|
<template #form="{ data }">
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<div class="col">
|
||||||
|
<VnInput
|
||||||
|
v-model="data.name"
|
||||||
|
:label="t('Roadmap')"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnInputDate v-model="data.etd" :label="t('ETD date')" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnInputTime v-model="data.etd" :label="t('ETD hour')" />
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
</template>
|
||||||
|
</FormModel>
|
||||||
|
</template>
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Roadmap: Troncal
|
||||||
|
ETD date: Fecha ETD
|
||||||
|
ETD hour: Hora ETD
|
||||||
|
</i18n>
|
|
@ -226,7 +226,7 @@ function confirmRemove() {
|
||||||
>
|
>
|
||||||
<template #body-cell-carrier="props">
|
<template #body-cell-carrier="props">
|
||||||
<QTd :props="props">
|
<QTd :props="props">
|
||||||
<span class="link">
|
<span v-if="props.value" class="link">
|
||||||
{{ props.value }}
|
{{ props.value }}
|
||||||
<SupplierDescriptorProxy
|
<SupplierDescriptorProxy
|
||||||
:id="props.row?.supplier?.id"
|
:id="props.row?.supplier?.id"
|
||||||
|
@ -254,14 +254,14 @@ function confirmRemove() {
|
||||||
</template>
|
</template>
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<!-- <QPageSticky :offset="[20, 20]">-->
|
<QPageSticky :offset="[20, 20]">
|
||||||
<!-- <RouterLink :to="{ name: 'RouteCreate' }">-->
|
<RouterLink :to="{ name: 'RouteRoadmapCreate' }">
|
||||||
<!-- <QBtn fab icon="add" color="primary" />-->
|
<QBtn fab icon="add" color="primary" />
|
||||||
<!-- <QTooltip>-->
|
<QTooltip>
|
||||||
<!-- {{ t('newRoute') }}-->
|
{{ t('Create roadmap') }}
|
||||||
<!-- </QTooltip>-->
|
</QTooltip>
|
||||||
<!-- </RouterLink>-->
|
</RouterLink>
|
||||||
<!-- </QPageSticky>-->
|
</QPageSticky>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -283,6 +283,7 @@ es:
|
||||||
Are you sure you want to continue?: ¿Seguro que quieres continuar?
|
Are you sure you want to continue?: ¿Seguro que quieres continuar?
|
||||||
The date can't be empty: La fecha no puede estar vacía
|
The date can't be empty: La fecha no puede estar vacía
|
||||||
Clone Selected Routes: Clonar rutas seleccionadas
|
Clone Selected Routes: Clonar rutas seleccionadas
|
||||||
|
Create roadmap: Crear trocal
|
||||||
Roadmap: Trocal
|
Roadmap: Trocal
|
||||||
Carrier: Transportista
|
Carrier: Transportista
|
||||||
Plate: Placa
|
Plate: Placa
|
||||||
|
|
|
@ -38,6 +38,15 @@ export default {
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Route/RouteRoadmap.vue'),
|
component: () => import('src/pages/Route/RouteRoadmap.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'roadmap/create',
|
||||||
|
name: 'RouteRoadmapCreate',
|
||||||
|
meta: {
|
||||||
|
title: 'RouteRoadmapCreate',
|
||||||
|
icon: 'vn:troncales',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Route/Roadmap/RoadmapCreate.vue'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
|
|
Loading…
Reference in New Issue