Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/ux issues gabi #295

Merged
merged 6 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/modules/Components/components/entity-card/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@
<div class="entity-card__content--terms">
<div v-if="areas" class="entity-card__content--terms-area">
<label v-if="entity.__objectType === 'opportunity'" class="area__title">
<?php i::_e('Áreas de interesse:') ?> ({{entity.terms.area.length}}):
<?php i::_e('Áreas de interesse') ?> ({{entity.terms.area.length}}):
</label>
<label v-if="entity.__objectType === 'agent' || entity.__objectType === 'space'" class="area__title">
<?php i::_e('Áreas de atuação:') ?> ({{entity.terms.area.length}}):
<?php i::_e('Áreas de atuação') ?> ({{entity.terms.area.length}}):
</label>
<p :class="['terms', entity.__objectType+'__color']"> {{areas}} </p>
<p :class="['terms']"> {{areas}} </p>
</div>

<div v-if="tags" class="entity-card__content--terms-tag">
<label class="tag__title">
<?php i::_e('Tags:') ?> ({{entity.terms.tag.length}}):
<?php i::_e('Tags') ?> ({{entity.terms.tag.length}}):
</label>
<p :class="['terms', entity.__objectType+'__color']"> {{tags}} </p>
<p :class="'terms'"> {{tags}} </p>
</div>

<div v-if="linguagens" class="entity-card__content--terms-linguagem">
Expand Down
10 changes: 5 additions & 5 deletions src/modules/Components/components/occurrence-card/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@
</div>
</div>
<div class="entity-card__content--terms">
<div v-if="tags" class="entity-card__content--terms-tag">
<div v-if="tags" class="-tag">
<label class="tag__title">
<?php i::_e('Tags:') ?> ({{event.terms.tag.length}}):
<?php i::_e('Tags') ?> ({{event.terms.tag.length}}):
</label>
<p :class="['terms', 'event__color']"> {{tags}} </p>
<p :class="'terms'"> {{tags}} </p>
</div>
<div v-if="linguagens" class="entity-card__content--terms-linguagem">
<label class="linguagem__title">
<?php i::_e('linguagens:') ?> ({{event.terms.linguagem.length}}):
<?php i::_e('linguagens') ?> ({{event.terms.linguagem.length}}):
</label>
<p :class="['terms', 'event__color']"> {{linguagens}} </p>
<p :class="'terms'"> {{linguagens}} </p>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Entities/components/entity-map/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
?>

<?php $this->applyTemplateHook('entity-map','before'); ?>
<mc-map :center="entity.location">
<mc-map v-if="entity.endereco" :center="entity.location">
<mc-map-marker :entity="entity" :draggable="editable" @moved="change($event)"></mc-map-marker>
</mc-map>
<?php $this->applyTemplateHook('entity-map','after'); ?>
25 changes: 20 additions & 5 deletions src/modules/Entities/components/entity-terms/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,29 @@ app.component('entity-terms', {


addTerm(term) {
if (this.entity.terms[this.taxonomy].indexOf(term) < 0) {
this.entity.terms[this.taxonomy].push(term);
if(this.spaceCheck(term)) {
if (this.entity.terms[this.taxonomy].indexOf(term) < 0) {
this.entity.terms[this.taxonomy].push(term);

}

if (this.terms.indexOf(term) < 0) {
this.terms.push(term);
}
}
},

if (this.terms.indexOf(term) < 0) {
this.terms.push(term);
spaceCheck(term) {
if(this.taxonomy == "tag") {
let tam = term.length;
for (let i = 0; i < tam; i++) {
if (term[i] != " ") {
return true;
}
}
return false;
}

return true;
},

taxomyExists() {
Expand Down
1 change: 0 additions & 1 deletion src/modules/Entities/components/entity-terms/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<div v-if="taxomyExists() && (editable || entity.terms?.[taxonomy].length > 0)" :class="['entity-terms', classes, error]">
<div class="entity-terms__header">
<mc-title tag="h4" :short-length="0" size="medium" class="bold">{{title ?? taxonomy}}</mc-title>
<span class="entity-terms__required" style="color: red">*</span>
</div>

<mc-popover v-if="allowInsert && editable" openside="down-right" @open="loadTerms()" :title="popoverTitle">
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Entities/views/project/single.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<div v-if="entity.emailPublico" class="additional-info__item">
<p class="additional-info__item__title"><?php i::_e("email:"); ?></p>
<p class="additional-info__item__content">{{entity.emailPublico}}</p>
<p>{{entity.emailPublico}}</p>
</div>
</div>
<div v-if="entity.longDescription!=null" class="col-12">
Expand Down
Loading