Bladeren bron

scss and fixes

master
Florian Eisenmenger 1 jaar geleden
bovenliggende
commit
2671d3ee3f
12 gewijzigde bestanden met toevoegingen van 40 en 26 verwijderingen
  1. +1
    -1
      matsen-tool/src/app/_views/partners/partner-list/partner-list.component.html
  2. +1
    -1
      matsen-tool/src/app/_views/partners/partner-list/partner-list.component.ts
  3. +1
    -1
      matsen-tool/src/app/_views/products/product-list/product-list.component.html
  4. +1
    -1
      matsen-tool/src/app/_views/products/product-list/product-list.component.ts
  5. +1
    -1
      matsen-tool/src/app/_views/sales/sale-list/sale-list.component.html
  6. +1
    -1
      matsen-tool/src/app/_views/sales/sale-list/sale-list.component.ts
  7. +1
    -2
      matsen-tool/src/app/_views/sales/sale-summary/sale-summary.component.ts
  8. +24
    -15
      matsen-tool/src/app/_views/user/user-detail/user-detail.component.ts
  9. +1
    -1
      matsen-tool/src/app/_views/user/user-list/user-list.component.html
  10. +1
    -1
      matsen-tool/src/app/_views/user/user-list/user-list.component.ts
  11. +1
    -0
      matsen-tool/src/assets/scss/_button.scss
  12. +6
    -1
      matsen-tool/src/assets/scss/_table.scss

+ 1
- 1
matsen-tool/src/app/_views/partners/partner-list/partner-list.component.html Bestand weergeven

@@ -63,7 +63,7 @@
<th mat-header-cell class="text-end" *matHeaderCellDef>
{{ 'overview.details' | translate }}
</th>
<td mat-cell class="text-end" *matCellDef="let element">
<td mat-cell class="spt-button-td" *matCellDef="let element">
<span class="btn btn-primary spt-icon-details"
data-type="user-tool" data-action="edit" (click)="navigateToPartnerDetails(element)"></span>
</td>


+ 1
- 1
matsen-tool/src/app/_views/partners/partner-list/partner-list.component.ts Bestand weergeven

@@ -52,7 +52,7 @@ export class PartnerListComponent implements OnInit, AfterViewInit {
private translateService: TranslateService,
protected appHelperService: AppHelperService,
) {
this.displayedColumns = ['pos', 'image', 'name', 'address', 'website', 'details'];
this.displayedColumns = ['details', 'pos', 'image', 'name', 'address', 'website'];
this.sort = new MatSort();
this.partnersSub = new Subscription();
this.partners = [];


+ 1
- 1
matsen-tool/src/app/_views/products/product-list/product-list.component.html Bestand weergeven

@@ -61,7 +61,7 @@
<th mat-header-cell class="text-end" *matHeaderCellDef>
{{ 'overview.details' | translate }}
</th>
<td mat-cell class="text-end" *matCellDef="let element">
<td mat-cell class="spt-button-td" *matCellDef="let element">
<span class="btn btn-primary spt-icon-details"
data-type="user-tool" data-action="edit" (click)="navigateToProductDetails(element)"></span>
</td>


+ 1
- 1
matsen-tool/src/app/_views/products/product-list/product-list.component.ts Bestand weergeven

@@ -47,7 +47,7 @@ export class ProductListComponent implements OnInit, AfterViewInit {
protected appHelperService: AppHelperService,
) {
this.sort = new MatSort();
this.displayedColumns = ['pos', 'image', 'name', 'storage', 'number', 'details'];
this.displayedColumns = ['details', 'pos', 'image', 'name', 'storage', 'number'];

this.productsSub = new Subscription();
this.products = [];


+ 1
- 1
matsen-tool/src/app/_views/sales/sale-list/sale-list.component.html Bestand weergeven

@@ -83,7 +83,7 @@
<th mat-header-cell class="text-end" *matHeaderCellDef>
{{ 'overview.details' | translate }}
</th>
<td mat-cell class="text-end" *matCellDef="let element">
<td mat-cell class="spt-button-td" *matCellDef="let element">
<span class="btn btn-primary spt-icon-details"
data-type="user-tool" data-action="edit" (click)="navigateToSaleDetails(element)"></span>
</td>


+ 1
- 1
matsen-tool/src/app/_views/sales/sale-list/sale-list.component.ts Bestand weergeven

@@ -37,7 +37,7 @@ export class SaleListComponent implements OnInit, AfterViewInit {
protected accountService: AccountService,
) {
this.sort = new MatSort();
this.displayedColumns = ['pos', 'user', 'partner', 'product', 'turnover', 'profit', 'date', 'details'];
this.displayedColumns = ['details', 'pos', 'user', 'partner', 'product', 'turnover', 'profit', 'date'];
this.salesSub = new Subscription();
this.sales = [];
this.salesSummarySub = new Subscription();


+ 1
- 2
matsen-tool/src/app/_views/sales/sale-summary/sale-summary.component.ts Bestand weergeven

@@ -36,9 +36,8 @@ export class SaleSummaryComponent implements OnInit, AfterViewInit {

getData() {
if (this.user !== undefined) {
console.log(this.user);
this.salesSummarySub = this.saleSummaryService.saleSummariesUserIdGet(
String(this.user?.id)
this.appHelperService.extractId(String(this.user?.id))
).subscribe(
data => {
this.saleSummaries = [data];


+ 24
- 15
matsen-tool/src/app/_views/user/user-detail/user-detail.component.ts Bestand weergeven

@@ -39,7 +39,6 @@ export class UserDetailComponent implements OnInit, AfterViewInit {

protected userSub: Subscription;
protected isCurrentUser: boolean;
protected userId!: string;

constructor(
private accountService: AccountService,
@@ -48,34 +47,44 @@ export class UserDetailComponent implements OnInit, AfterViewInit {
private route: ActivatedRoute,
) {
this.userSub = new Subscription();

this.isCurrentUser = false;

}

ngOnInit() {
this.route.params.subscribe(params => {
this.userId = params['id'];
});
console.log(this.userId);
if (this.user === undefined) {
this.route.params.subscribe(params => {
this.getUserData(params['id']);
});
} else {
this.setIsCurrentUser();
}
}

ngAfterViewInit(): void {
if (this.accountService.userValue?.userResource) {
let user = this.accountService.userValue?.userResource;
this.isCurrentUser = this.userId == user?.id;
}
this.getData();
// if (this.accountService.userValue?.userResource) {
// let user = this.accountService.userValue?.userResource;
// if (this.user.id === user.id) {
// this.isCurrentUser = true;
// }
// this.isCurrentUser = this.userId == user?.id;
// }
}

getData() {

getUserData(userId: string) {
this.userSub = this.userService.usersIdGet(
this.userId
userId
).subscribe(
data => {
this.user = data;
this.setIsCurrentUser();
}
);
}

setIsCurrentUser() {
if (this.accountService.userValue?.userResource) {
let user = this.accountService.userValue?.userResource;
this.isCurrentUser = this.user.id == user?.id;
}
}
}

+ 1
- 1
matsen-tool/src/app/_views/user/user-list/user-list.component.html Bestand weergeven

@@ -56,7 +56,7 @@
<th mat-header-cell class="text-end" *matHeaderCellDef>
{{ 'overview.details' | translate }}
</th>
<td mat-cell class="text-end" *matCellDef="let element">
<td mat-cell class="spt-button-td" *matCellDef="let element">
<span class="btn btn-primary spt-icon-details"
data-type="user-tool" data-action="edit" (click)="navigateToUserDetails(element)"></span>
</td>


+ 1
- 1
matsen-tool/src/app/_views/user/user-list/user-list.component.ts Bestand weergeven

@@ -30,7 +30,7 @@ export class UserListComponent implements OnInit, AfterViewInit {
private router: Router,
protected appHelperService: AppHelperService,
) {
this.displayedColumns = ['pos', 'image', 'firstName', 'lastName', 'email', 'details'];
this.displayedColumns = ['details', 'pos', 'image', 'firstName', 'lastName', 'email'];
this.sort = new MatSort();

this.sort = new MatSort();


+ 1
- 0
matsen-tool/src/assets/scss/_button.scss Bestand weergeven

@@ -90,6 +90,7 @@ body {
}

.spt-icon-details {
display: block;
width: 48px;
height: 48px;
background: #2e3a43 url("/assets/images/icons/details.svg") no-repeat center center;


+ 6
- 1
matsen-tool/src/assets/scss/_table.scss Bestand weergeven

@@ -22,12 +22,13 @@ th.mat-sort-header-sorted {
.mdc-data-table__header-cell {
padding-top: 8px;
padding-bottom: 8px;
@include transition();
}

.mat-mdc-row {
&:hover {
.mdc-data-table__cell {
background: #fbfbfb;
background: #f6f6f6;
}
}
}
@@ -88,3 +89,7 @@ th.mat-sort-header-sorted {
app-paging > .mat-mdc-paginator:first-child {
border-width: 4px;
}

.spt-button-td {
width: 85px;
}

Laden…
Annuleren
Opslaan