first commit
This commit is contained in:
40
src/pages/CompanyInfoPage.vue
Normal file
40
src/pages/CompanyInfoPage.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<pn-page-card>
|
||||
<template #title>
|
||||
<div class="flex items-center justify-between col-grow">
|
||||
<div>
|
||||
{{$t('company_info__title_card')}}
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="!isObjEqual<Company | undefined>(companyFromStore, companyMod)"
|
||||
@click = "companiesStore.updateCompany(companyId, companyMod)"
|
||||
flat round
|
||||
icon="mdi-check"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<pn-scroll-list>
|
||||
<company-info-block v-model="companyMod"/>
|
||||
<company-info-persons/>
|
||||
</pn-scroll-list>
|
||||
</pn-page-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import companyInfoBlock from 'components/admin/companyInfoBlock.vue'
|
||||
import companyInfoPersons from 'components/admin/companyInfoPersons.vue'
|
||||
import { useCompaniesStore } from 'stores/companies'
|
||||
import type { Company } from 'src/types'
|
||||
import { isObjEqual } from 'boot/helpers'
|
||||
|
||||
const route = useRoute()
|
||||
const companiesStore = useCompaniesStore()
|
||||
|
||||
const companyId = Number(route.params.id)
|
||||
const companyFromStore = companiesStore.companyById(companyId)
|
||||
const companyMod = ref({...(companyFromStore ? companyFromStore : <Company>{})})
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user