Skip to content

Commit

Permalink
feat: arema main portal and video indexing (#64)
Browse files Browse the repository at this point in the history
* feat: added some field hints #56

* feat: upload multiple files #56

* feat: markdown edition support #56

* feat: building fields added #56

* feat: fire classes #56

* fix: building material can have multiple types

* feat: clust results in frontend

* feat: entity page added to frontend (wip)

* feat: entity page added to frontend (wip)

* feat: search page state in store (wip)

* feat: fire properties have low/high and input suggestions

* feat: markdown guide link

* feat: use search service to retrieve document from éain portal

* feat: FTKG font applied

* feat: physical characteristics

* feat: search panel, hash path

* feat: index page style

* feat: relations are indexed

* feat: added building relation with tc via be

* feat: document images carousel

* feat: display images

* feat: file can be a url, youtube/vimeo videos handled in a player

* fix: ensure taxos before getting tags labels

* feat: search link added in doc page

* feat: select all terms if none are selected, otherwise clear selections

* feat: term btns are smaller than voc ones

* fix: taxo labels typo

* fix: fire norms

* feat: prepare frontend for it lang

* feat: map's list is scrollable

* feat: styling

* chore: tr

* chore: close drawer on route update

* feat: videos indexed and displayed in a search interface #63

* fix: videos page title

* feat: extract viedo links from markdown text #63

* fix: text input model type
  • Loading branch information
ymarcon authored Jan 8, 2025
1 parent ec876fe commit cd0b9f4
Show file tree
Hide file tree
Showing 75 changed files with 4,801 additions and 1,513 deletions.
11 changes: 10 additions & 1 deletion admin/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"singleQuote": true,
"semi": true
"semi": true,
"printWidth": 120,
"overrides": [
{
"files": "src/i18n/**/index.js",
"options": {
"printWidth": 10000
}
}
]
}
954 changes: 919 additions & 35 deletions admin/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"devDependencies": {
"@intlify/vite-plugin-vue-i18n": "^7.0.0",
"@quasar/app-vite": "^1.3.0",
"@quasar/quasar-app-extension-qmarkdown": "^2.0.0-beta.10",
"@types/node": "^12.20.21",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
Expand Down
16 changes: 16 additions & 0 deletions admin/quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js

const { configure } = require('quasar/wrappers');
const { mergeConfig } = require('vite');
const path = require('path');

module.exports = configure(function (ctx) {
Expand Down Expand Up @@ -71,6 +72,21 @@ module.exports = configure(function (ctx) {
// distDir

// extendViteConf (viteConf) {},
// https://github.com/quasarframework/quasar/issues/8513#issuecomment-1127654470
extendViteConf(viteConf, { isServer, isClient }) {
viteConf.base = '';
viteConf.css = mergeConfig(viteConf.css, {
preprocessorOptions: {
// silence deprecation warnings from quasar-ui-qmarkdown
sass: {
silenceDeprecations: ['color-functions'],
},
scss: {
silenceDeprecations: ['color-functions'],
},
},
});
},
// viteVuePluginOptions: {},

vitePlugins: [
Expand Down
5 changes: 5 additions & 0 deletions admin/quasar.extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"@quasar/qmarkdown": {
"import_md": true
}
}
139 changes: 48 additions & 91 deletions admin/src/components/BuildingDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<q-card-section>
<q-tabs v-model="tab" dense align="left" no-caps>
<q-tab name="general" :label="$t('general')" />
<q-tab name="location" :label="$t('location')" />
<q-tab name="general" :label="$t('general') + ' *'" />
<q-tab name="location" :label="$t('location') + ' *'" />
<q-tab name="multimedia" :label="$t('multimedia')" />
<q-tab name="relations" :label="$t('relations')" />
</q-tabs>
Expand All @@ -21,27 +21,18 @@
<q-tab-panel name="general" class="q-pl-none q-pr-none">
<div class="row q-mb-md q-col-gutter-md">
<div class="col-12 col-sm-3">
<q-input
filled
v-model="selected.name"
:label="$t('name') + '*'"
/>
<q-input filled v-model="selected.name" :label="$t('name') + ' *'" />
</div>
<div class="col-12 col-sm-3">
<taxonomy-select
v-model="selected.type"
entity-type="building"
path="type"
:label="$t('type') + '*'"
:label="$t('type') + ' *'"
/>
</div>
<div class="col-12 col-sm-3">
<taxonomy-select
v-model="selected.status"
entity-type="building"
path="status"
:label="$t('status')"
/>
<taxonomy-select v-model="selected.status" entity-type="building" path="status" :label="$t('status')" />
</div>
<div class="col-12 col-sm-3">
<taxonomy-select
Expand All @@ -53,41 +44,43 @@
/>
</div>
</div>
<q-input
filled
<div class="row q-mb-md q-col-gutter-md">
<div class="col-12 col-sm-4">
<q-input filled v-model="selected.client" :label="$t('client')" />
</div>
<div class="col-12 col-sm-4">
<q-input
filled
v-model.number="selected.gross_internal_area"
type="number"
:label="$t('gross_internal_area')"
:hint="$t('gross_internal_area_hint')"
/>
</div>
<div class="col-12 col-sm-4">
<q-input filled v-model.number="selected.year" type="number" :label="$t('year_of_construction')" />
</div>
</div>
<text-input
v-model="selected.description"
autogrow
:label="$t('description')"
:hint="$t('description_bd_hint')"
class="q-mb-md"
/>
<q-input
filled
<text-input
v-model="selected.article_top"
type="textarea"
:label="$t('article_top')"
:hint="$t('article_top_bd_hint')"
class="q-mb-md"
/>
<q-input
filled
<text-input
v-model="selected.article_bottom"
type="textarea"
:label="$t('article_bottom')"
:hint="$t('article_bottom_bd_hint')"
class="q-mb-md"
/>
<q-input
filled
v-model="selected.side_note"
type="textarea"
:label="$t('side_note')"
class="q-mb-md"
/>
<q-input
filled
v-model="selected.external_links"
type="textarea"
:label="$t('external_links')"
class="q-mb-md"
/>
<text-input v-model="selected.side_note" :label="$t('side_note')" class="q-mb-md" />
<text-input v-model="selected.external_links" :label="$t('external_links')" class="q-mb-md" />
</q-tab-panel>
<q-tab-panel name="location" class="q-pl-none q-pr-none">
<point-map-input
Expand Down Expand Up @@ -128,23 +121,15 @@
<div class="text-bold q-mb-sm">{{ $t('building_elements') }}</div>
<q-card flat bordered class="bg-grey-2">
<q-card-section class="q-pa-none">
<div
v-if="buildingElements?.length === 0"
class="text-help q-pa-md"
>
<div v-if="buildingElements?.length === 0" class="text-help q-pa-md">
{{ $t('no_building_elements') }}
</div>
<q-list separator>
<q-item
v-for="(element, index) in buildingElements"
:key="index"
>
<q-item v-for="(element, index) in buildingElements" :key="index">
<q-item-section>
<building-element-form
v-model="buildingElements[index]"
:technical-constructions-options="
technicalConstructionsOptions
"
:technical-constructions-options="technicalConstructionsOptions"
:professionals-options="professionalsOptions"
/>
</q-item-section>
Expand All @@ -163,12 +148,7 @@
</q-list>
</q-card-section>
<q-card-actions class="q-pa-md">
<q-btn
color="primary"
icon="add"
size="sm"
@click="onAddBuildingElement"
/>
<q-btn color="primary" icon="add" size="sm" @click="onAddBuildingElement" />
</q-card-actions>
</q-card>
</q-tab-panel>
Expand All @@ -178,19 +158,8 @@
<q-separator />

<q-card-actions align="right" class="bg-grey-3">
<q-btn
flat
:label="$t('cancel')"
color="secondary"
@click="onCancel"
v-close-popup
/>
<q-btn
:label="$t('save')"
color="primary"
@click="onSave"
:disable="!isValid"
/>
<q-btn flat :label="$t('cancel')" color="secondary" @click="onCancel" v-close-popup />
<q-btn :label="$t('save')" color="primary" @click="onSave" :disable="!isValid" />
</q-card-actions>
</q-card>
</q-dialog>
Expand All @@ -202,19 +171,14 @@ export default defineComponent({
});
</script>
<script setup lang="ts">
import {
BuildingMaterial,
Building,
Professional,
TechnicalConstruction,
BuildingElement,
} from 'src/models';
import { BuildingMaterial, Building, Professional, TechnicalConstruction, BuildingElement } from 'src/models';
import { notifyError } from '../utils/notify';
import PointMapInput from 'src/components/PointMapInput.vue';
import FilesInput from 'src/components/FilesInput.vue';
import TaxonomySelect from 'src/components/TaxonomySelect.vue';
import BuildingElementForm from 'src/components/BuildingElementForm.vue';
import { Option } from 'src/components/models';
import TextInput from 'src/components/TextInput.vue';
interface DialogProps {
modelValue: boolean;
Expand Down Expand Up @@ -283,18 +247,14 @@ watch(
filter: {},
})
.then((res) => {
buildingMaterialsOptions.value = res.data.map(
(item: BuildingMaterial) => ({
label: item.name,
value: item.id,
}),
);
buildingMaterialsOptions.value = res.data.map((item: BuildingMaterial) => ({
label: item.name,
value: item.id,
}));
});
if (editMode.value) {
buildingMaterials.value = selected.value.building_materials
? selected.value.building_materials.map(
(item: BuildingMaterial) => item.id,
)
? selected.value.building_materials.map((item: BuildingMaterial) => item.id)
: [];
}
Expand All @@ -306,12 +266,10 @@ watch(
filter: {},
})
.then((res) => {
technicalConstructionsOptions.value = res.data.map(
(item: TechnicalConstruction) => ({
label: item.name,
value: item.id,
}),
);
technicalConstructionsOptions.value = res.data.map((item: TechnicalConstruction) => ({
label: item.name,
value: item.id,
}));
});
professionals.value = [];
Expand Down Expand Up @@ -344,8 +302,7 @@ watch(
.then((res) => {
buildingElements.value =
res.data?.map((be: BuildingElement) => {
be.professional_ids =
be.professionals?.map((item: Professional) => item.id) || [];
be.professional_ids = be.professionals?.map((item: Professional) => item.id) || [];
delete be.professionals;
return be;
}) || [];
Expand Down
Loading

0 comments on commit cd0b9f4

Please sign in to comment.