refactor: refs #6683 remove unused imports and update property observation handling
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
f5384a1d5d
commit
79fa369fd1
|
@ -1,16 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
|
||||||
import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import axios from 'axios';
|
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
|
||||||
import PropertyCard from './PropertyCard.vue';
|
import PropertyCard from './PropertyCard.vue';
|
||||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
|
|
||||||
const { notify } = useNotify();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
|
|
|
@ -6,7 +6,6 @@ import { dashIfEmpty, toDate, toCurrency } from 'src/filters';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import VnToSummary from 'src/components/ui/VnToSummary.vue';
|
import VnToSummary from 'src/components/ui/VnToSummary.vue';
|
||||||
|
@ -18,7 +17,6 @@ import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.v
|
||||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { notify } = useNotify();
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -84,11 +82,9 @@ const dmsColumns = ref([
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
const summary = ref();
|
const summary = ref();
|
||||||
const property = computed(() => summary.value?.entity);
|
|
||||||
const propertyUrl = ref();
|
const propertyUrl = ref();
|
||||||
const propertyDms = ref(null);
|
const propertyDms = ref(null);
|
||||||
|
|
||||||
const descriptorData = useArrayData('Property');
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
propertyUrl.value = (await getUrl('property/')) + entityId.value + '/';
|
propertyUrl.value = (await getUrl('property/')) + entityId.value + '/';
|
||||||
|
@ -296,15 +292,15 @@ function toPropertyUrl(section) {
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard v-if="entity?.notes.length > 0" class="vn-max">
|
<QCard v-if="entity?.propertyObservation.length > 0" class="vn-max">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="toPropertyUrl('notes')"
|
:url="toPropertyUrl('notes')"
|
||||||
:text="t('globals.notes')"
|
:text="t('globals.notes')"
|
||||||
data-cy="titleNotesBlock"
|
data-cy="titleNotesBlock"
|
||||||
/>
|
/>
|
||||||
<QCardSection
|
<QCardSection
|
||||||
v-if="entity?.notes"
|
v-if="entity?.propertyObservation"
|
||||||
v-for="note in entity?.notes"
|
v-for="note in entity?.propertyObservation"
|
||||||
horizontal
|
horizontal
|
||||||
class="q-pb-sm"
|
class="q-pb-sm"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue