Skip to content

Commit

Permalink
Merge pull request #443 from gabi-gandine/padronizacao-eventos-gratuitos
Browse files Browse the repository at this point in the history
Padronizacao eventos gratuitos
  • Loading branch information
lpirola authored Aug 29, 2024
2 parents 9a457f4 + c43616c commit 149d5b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/Entities/components/create-occurrence/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ app.component('create-occurrence', {
let floatNum = intNum.slice(0, -2) + "." + intNum.slice(-2);
this.price = this.moneyMask(floatNum);
},
checkPrice() {
if(this.price == "R$ 0,00")
return null;
return this.price;
},

// Criação da ocorrência
create(modal) {
Expand Down Expand Up @@ -235,7 +240,7 @@ app.component('create-occurrence', {
}

this.newOccurrence['description'] = this.description ?? '';
this.newOccurrence['price'] = this.free ? __('Gratuito', 'create-occurrence') : this.price;
this.newOccurrence['price'] = this.free ? __('Gratuito', 'create-occurrence') : this.checkPrice();
this.newOccurrence['priceInfo'] = this.priceInfo ?? '';

this.newOccurrence.save().then(() => {
Expand Down

0 comments on commit 149d5b0

Please sign in to comment.