Skip to content

Commit

Permalink
teams: smoother reports (fixes #7683) (#7684)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
sahilvunnam and dogi authored Oct 30, 2024
1 parent 8a5fd1e commit db56680
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "planet",
"license": "AGPL-3.0",
"version": "0.15.16",
"version": "0.15.17",
"myplanet": {
"latest": "v0.20.69",
"min": "v0.19.69"
Expand Down
38 changes: 20 additions & 18 deletions src/app/teams/teams-reports-detail.component.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<div class="report-grid">
<b i18n>Beginning Balance</b><b>{{report.beginningBalance | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<mat-divider class="full-width"></mat-divider>
<span i18n>Sales</span><span>{{report.sales | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</span>
<span i18n>Other</span><span>{{report.otherIncome | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</span>
<b i18n>Total Income</b><b>{{income | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<mat-divider class="full-width"></mat-divider>
<span i18n>Personnel</span><span>{{report.wages | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</span>
<span i18n>Non-Personnel</span><span>{{report.otherExpenses | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</span>
<b i18n>Total Expenses</b><b>{{expenses | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<mat-divider class="full-width"></mat-divider>
<b i18n>Profit/Loss</b><b>{{net | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<b i18n>Ending Balance</b><b>{{endingBalance | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<div class="report-grid-container">
<div class="report-grid">
<b i18n>Beginning Balance</b><b>{{report.beginningBalance | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<mat-divider class="full-width"></mat-divider>
<span i18n>Sales</span><span>{{report.sales | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</span>
<span i18n>Other</span><span>{{report.otherIncome | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</span>
<b i18n>Total Income</b><b>{{income | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<mat-divider class="full-width"></mat-divider>
<span i18n>Personnel</span><span>{{report.wages | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</span>
<span i18n>Non-Personnel</span><span>{{report.otherExpenses | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</span>
<b i18n>Total Expenses</b><b>{{expenses | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<mat-divider class="full-width"></mat-divider>
<b i18n>Profit/Loss</b><b>{{net | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
<b i18n>Ending Balance</b><b>{{endingBalance | currency:this.curCode?.code:this.curCode?.symbol:'1.0-2'}}</b>
</div>
<ng-container *ngIf="showSummary">
<h4 i18n>Report Summary</h4>
<planet-markdown [content]="report.description"></planet-markdown>
<div><ng-container i18n>Report created on:</ng-container> {{report.createdDate | date }}<ng-container *ngIf="report.createdDate !== report.updatedDate"> | <ng-container i18n>Updated on:</ng-container> {{report.updatedDate | date}}</ng-container></div>
</ng-container>
</div>
<ng-container *ngIf="showSummary">
<h4 i18n>Report Summary</h4>
<planet-markdown [content]="report.description"></planet-markdown>
<div><ng-container i18n>Report created on:</ng-container> {{report.createdDate | date }}<ng-container *ngIf="report.createdDate !== report.updatedDate"> | <ng-container i18n>Updated on:</ng-container> {{report.updatedDate | date}}</ng-container></div>
</ng-container>
7 changes: 6 additions & 1 deletion src/app/teams/teams-reports-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ import { StateService } from '../shared/state.service';
selector: 'planet-teams-reports-detail',
templateUrl: './teams-reports-detail.component.html',
styles: [ `
.report-grid-container {
overflow-x: auto;
overflow-y: auto;
}
.report-grid {
display: grid;
grid-template-columns: 250px auto;
grid-template-columns: 250px 1fr;
grid-row-gap: 0.25rem;
overflow-wrap: break-word;
}
.report-grid .full-width {
grid-column: 1 / -1;
Expand Down

0 comments on commit db56680

Please sign in to comment.