feat: refs #6891 worker & supplier
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
6b1befa037
commit
014ec60e47
|
@ -1,7 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onBeforeMount, computed } from 'vue';
|
import { onBeforeMount, computed } from 'vue';
|
||||||
import { useRoute, onBeforeRouteUpdate } from 'vue-router';
|
import { useRoute, onBeforeRouteUpdate } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import useCardSize from 'src/composables/useCardSize';
|
import useCardSize from 'src/composables/useCardSize';
|
||||||
|
@ -19,12 +18,11 @@ const props = defineProps({
|
||||||
filterPanel: { type: Object, default: undefined },
|
filterPanel: { type: Object, default: undefined },
|
||||||
searchDataKey: { type: String, default: undefined },
|
searchDataKey: { type: String, default: undefined },
|
||||||
searchUrl: { type: String, default: undefined },
|
searchUrl: { type: String, default: undefined },
|
||||||
searchbarLabel: { type: String, default: undefined },
|
searchbarLabel: { type: String, default: '' },
|
||||||
searchbarInfo: { type: String, default: undefined },
|
searchbarInfo: { type: String, default: '' },
|
||||||
customRouteRedirectName: { type: String, default: undefined },
|
customRouteRedirectName: { type: String, default: undefined },
|
||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const url = computed(() => {
|
const url = computed(() => {
|
||||||
|
@ -58,8 +56,8 @@ if (props.baseUrl) {
|
||||||
<VnSearchbar
|
<VnSearchbar
|
||||||
:data-key="props.searchDataKey"
|
:data-key="props.searchDataKey"
|
||||||
:url="props.searchUrl"
|
:url="props.searchUrl"
|
||||||
:label="t(props.searchbarLabel)"
|
:label="props.searchbarLabel"
|
||||||
:info="t(props.searchbarInfo)"
|
:info="props.searchbarInfo"
|
||||||
:custom-route-redirect-name="props.customRouteRedirectName"
|
:custom-route-redirect-name="props.customRouteRedirectName"
|
||||||
/>
|
/>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
|
@ -4,8 +4,10 @@ import { useQuasar } from 'quasar';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import useRedirect from 'src/composables/useRedirect';
|
import useRedirect from 'src/composables/useRedirect';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dataKey: {
|
dataKey: {
|
||||||
|
@ -101,7 +103,7 @@ async function search() {
|
||||||
<VnInput
|
<VnInput
|
||||||
id="searchbar"
|
id="searchbar"
|
||||||
v-model="searchText"
|
v-model="searchText"
|
||||||
:placeholder="props.label"
|
:placeholder="t(props.label)"
|
||||||
dense
|
dense
|
||||||
standout
|
standout
|
||||||
autofocus
|
autofocus
|
||||||
|
@ -120,7 +122,7 @@ async function search() {
|
||||||
name="info"
|
name="info"
|
||||||
class="cursor-info"
|
class="cursor-info"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ props.info }}</QTooltip>
|
<QTooltip>{{ t(props.info) }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</VnInput>
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import SupplierDescriptor from './SupplierDescriptor.vue';
|
import SupplierDescriptor from './SupplierDescriptor.vue';
|
||||||
|
import SupplierListFilter from '../SupplierListFilter.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCard
|
||||||
data-key="Supplier"
|
data-key="Supplier"
|
||||||
base-url="Suppliers"
|
base-url="Suppliers"
|
||||||
:descriptor="SupplierDescriptor"
|
:descriptor="SupplierDescriptor"
|
||||||
searchbar-data-key="SupplierList"
|
:filter-panel="SupplierListFilter"
|
||||||
searchbar-url="Suppliers/filter"
|
search-data-key="SupplierList"
|
||||||
|
search-url="Suppliers/filter"
|
||||||
searchbar-label="Search suppliers"
|
searchbar-label="Search suppliers"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import WorkerDescriptor from './WorkerDescriptor.vue';
|
import WorkerDescriptor from './WorkerDescriptor.vue';
|
||||||
|
import WorkerFilter from '../WorkerFilter.vue';
|
||||||
const filter = { where: {} };
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCard
|
||||||
data-key="Worker"
|
data-key="Worker"
|
||||||
custom-url="Workers/Summary"
|
base-url="Workers"
|
||||||
:descriptor="WorkerDescriptor"
|
:descriptor="WorkerDescriptor"
|
||||||
:filter="filter"
|
:filter-panel="WorkerFilter"
|
||||||
searchbar-data-key="WorkerList"
|
search-data-key="WorkerList"
|
||||||
searchbar-url="Workers/filter"
|
search-url="Workers/filter"
|
||||||
searchbar-label="Search worker"
|
searchbar-label="Search worker"
|
||||||
searchbar-info="You can search by worker id or name"
|
searchbar-info="You can search by worker id or name"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue