Skip to content

Commit

Permalink
fix: csv new-lines
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanfallon committed Jul 19, 2024
1 parent f5786c6 commit 833363c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/src/pdc/services/trip/actions/file/BuildFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class BuildFile {
let row: string = "";
while ((row = stringifier.read()) !== null) {
if (row === "") continue;
await fd.write(new TextEncoder().encode(row + "\n"));
await fd.write(new TextEncoder().encode(row));
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@
</a>
</p>
<mat-radio-group formControlName="format" class="format-radio-group">
<label>
<mat-radio-button value="v2"></mat-radio-button>
<span>Version 2 (CSV)</span>
</label>
<label>
<mat-radio-button value="v3"></mat-radio-button>
<span>Version 3 (XLSX)</span>
</label>
<label>
<mat-radio-button value="v2"></mat-radio-button>
<span>Version 2 (CSV)</span>
</label>
</mat-radio-group>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class TripExportComponent extends DestroyObservable implements OnInit {
}

get format(): "v2" | "v3" {
return this.form.get("format").value || "v2";
return this.form.get("format").value || "v3";
}

constructor(
Expand All @@ -86,7 +86,7 @@ export class TripExportComponent extends DestroyObservable implements OnInit {
? endOfDay(new Date())
: endOfDay(sub(new Date(), { days: 5 }));
this.form = this.fb.group({
format: "v2",
format: "v3",
date: this.fb.group({
start: [moment(startOfDay(sub(new Date(), { months: 1 }))), [
Validators.required,
Expand Down

0 comments on commit 833363c

Please sign in to comment.