feat: agencyWorkCenter
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
e184f70be5
commit
d490d85ecc
|
@ -1177,6 +1177,9 @@ agency:
|
|||
removeItemError: Error al eliminar la agencia
|
||||
pageTitles:
|
||||
agency: Agencia
|
||||
searchBar:
|
||||
info: Puedes buscar por nombre o id
|
||||
label: Buscar agencia...
|
||||
components:
|
||||
topbar: {}
|
||||
itemsFilterPanel:
|
||||
|
|
|
@ -6,7 +6,6 @@ import { useI18n } from 'vue-i18n';
|
|||
import FormModel from 'components/FormModel.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
|
||||
|
@ -22,7 +21,6 @@ const warehouses = ref([]);
|
|||
@on-fetch="(data) => (warehouses = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnSubToolbar />
|
||||
<FormModel :url="`Agencies/${routeId}`" model="agency" auto-load>
|
||||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
<script setup>
|
||||
import { onMounted, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import LeftMenu from 'components/LeftMenu.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
|
||||
import AgencyDescriptor from 'pages/Agency/Card/AgencyDescriptor.vue';
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const stateStore = useStateStore();
|
||||
|
||||
const arrayData = useArrayData('Agency', {
|
||||
url: `Agencies/${route.params.id}`,
|
||||
});
|
||||
|
@ -28,23 +23,13 @@ watch(
|
|||
);
|
||||
</script>
|
||||
<template>
|
||||
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
|
||||
<VnSearchbar
|
||||
:info="t('Agency.searchBar.info')"
|
||||
:label="t('Agency.searchBar.label')"
|
||||
data-key="AgencyList"
|
||||
/>
|
||||
</Teleport>
|
||||
<QDrawer v-model="stateStore.leftDrawer" show-if-above :width="256">
|
||||
<QScrollArea class="fit">
|
||||
<AgencyDescriptor />
|
||||
<QSeparator />
|
||||
<LeftMenu source="card" />
|
||||
</QScrollArea>
|
||||
</QDrawer>
|
||||
<QPageContainer>
|
||||
<QPage>
|
||||
<RouterView></RouterView>
|
||||
</QPage>
|
||||
</QPageContainer>
|
||||
<VnCard
|
||||
data-key="Agency"
|
||||
base-url="Agencies"
|
||||
:descriptor="AgencyDescriptor"
|
||||
searchbar-data-key="AgencyList"
|
||||
searchbar-url="Agencies"
|
||||
searchbar-label="agency.searchBar.label"
|
||||
searchbar-info="agency.searchBar.info"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -133,6 +133,7 @@ async function deleteWorCenter(id) {
|
|||
isAnyVolumeAllowed: Permite cualquier volumen
|
||||
Search agency: Buscar agencia
|
||||
You can search by name: Puedes buscar por nombre
|
||||
This workCenter is already assigned to this agency: Este workCenter ya está asignado a esta agencia
|
||||
en:
|
||||
isOwn: Has owner
|
||||
isAnyVolumeAllowed: Allows any volume
|
||||
|
|
|
@ -1,25 +1,51 @@
|
|||
describe('template spec', () => {
|
||||
const agencyId = 11;
|
||||
beforeEach(() => {
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/agency`);
|
||||
});
|
||||
|
||||
it('passes', () => {
|
||||
it('assign workCenter', () => {
|
||||
cy.visit(`/#/agency`);
|
||||
/* ==== Generated with Cypress Studio ==== */
|
||||
cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click();
|
||||
cy.get('[href="#/agency/1/workCenter"] > .q-item__section--main').click();
|
||||
cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click();
|
||||
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get('#f_fa5833a2-f919-4542-b663-e72b3ba4ffe5').click();
|
||||
cy.get('#f_fa5833a2-f919-4542-b663-e72b3ba4ffe5_0').click();
|
||||
cy.get('#formModel > .q-card').click();
|
||||
cy.get(
|
||||
'.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'
|
||||
).type('workCenterOne{enter}');
|
||||
cy.get('.q-btn--standard > .q-btn__content > .block').click();
|
||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||
});
|
||||
|
||||
it('delete workCenter', () => {
|
||||
cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click();
|
||||
cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click();
|
||||
cy.get('.q-item__section--side > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get('.q-notification__message').should(
|
||||
'have.text',
|
||||
'Agency removed successfully'
|
||||
);
|
||||
});
|
||||
|
||||
it('error on duplicate workCenter', () => {
|
||||
cy.visit(`/#/agency`);
|
||||
cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click();
|
||||
cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click();
|
||||
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get('#f_94743509-f7a7-4e5c-83f4-61ab52c7cd72').click();
|
||||
cy.get('#f_94743509-f7a7-4e5c-83f4-61ab52c7cd72_1 > .q-item__section').click();
|
||||
cy.get(
|
||||
'.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'
|
||||
).type('workCenterOne{enter}');
|
||||
cy.get('.q-btn--standard > .q-btn__content > .block').click();
|
||||
cy.get('.q-btn--flat > .q-btn__content > .block').;
|
||||
/* ==== End Cypress Studio ==== */
|
||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get(
|
||||
'.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'
|
||||
).type('workCenterOne{enter}');
|
||||
cy.get('.q-btn--standard > .q-btn__content > .block').click();
|
||||
|
||||
cy.get(
|
||||
':nth-child(2) > .q-notification__wrapper > .q-notification__content > .q-notification__message'
|
||||
).should('have.text', 'This workCenter is already assigned to this agency');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue