Skip to content

Commit

Permalink
coloca log
Browse files Browse the repository at this point in the history
  • Loading branch information
eemr3 committed Sep 9, 2022
1 parent 9e49ddb commit d129a3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/services/Treatment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const createTreatment = async (data: ITreatment): Promise<Treatment> => {

const calcValue = [];
const dates = calcularParcelas(installmentAmount - 1, startDate);
console.info(dates);
console.info('service', startDate);

console.info('service', dates);

if (installmentAmount > 0) {
for (let index = 0; index < installmentAmount - 1; index += 1) {
Expand Down
4 changes: 3 additions & 1 deletion src/utils/generateDates.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export function calcularParcelas(parcelas: number, stringData: string) {
console.info('calcularParcelas', stringData);
const newDate = new Date(stringData).toLocaleDateString();
console.info('calcularParcelas', newDate);
const ano = newDate.substring(6, 10);
const mes = newDate.substring(3, 5);
const dia = newDate.substring(0, 2);
Expand Down Expand Up @@ -29,6 +31,6 @@ export function calcularParcelas(parcelas: number, stringData: string) {
),
);
}

console.info('calcularParcelas', dateArray);
return dateArray;
}

0 comments on commit d129a3c

Please sign in to comment.