From 662182c2490b0ab5bf31b33766094895302d1e8d Mon Sep 17 00:00:00 2001 From: gabriela Date: Wed, 28 Aug 2024 20:46:41 -0300 Subject: [PATCH 1/2] padronizacao-eventos-gratuitos --- .../Entities/components/create-occurrence/script.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/Entities/components/create-occurrence/script.js b/src/modules/Entities/components/create-occurrence/script.js index 5db0c08cb0..4422753631 100644 --- a/src/modules/Entities/components/create-occurrence/script.js +++ b/src/modules/Entities/components/create-occurrence/script.js @@ -184,6 +184,12 @@ 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) { @@ -235,7 +241,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(() => { From c43616c23c527e700070b470343db18d0f48b60d Mon Sep 17 00:00:00 2001 From: gabriela Date: Wed, 28 Aug 2024 20:52:20 -0300 Subject: [PATCH 2/2] eventos-gratuitos-padronizados --- src/modules/Entities/components/create-occurrence/script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/Entities/components/create-occurrence/script.js b/src/modules/Entities/components/create-occurrence/script.js index 4422753631..1a35fdda20 100644 --- a/src/modules/Entities/components/create-occurrence/script.js +++ b/src/modules/Entities/components/create-occurrence/script.js @@ -185,9 +185,8 @@ app.component('create-occurrence', { this.price = this.moneyMask(floatNum); }, checkPrice() { - if(this.price == "R$ 0,00") { + if(this.price == "R$ 0,00") return null; - } return this.price; },