Przeglądaj źródła

scss and fixes

master
Florian Eisenmenger 1 rok temu
rodzic
commit
2671d3ee3f
12 zmienionych plików z 40 dodań i 26 usunięć
  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 Wyświetl plik

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


+ 1
- 1
matsen-tool/src/app/_views/partners/partner-list/partner-list.component.ts Wyświetl plik

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


+ 1
- 1
matsen-tool/src/app/_views/products/product-list/product-list.component.html Wyświetl plik

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


+ 1
- 1
matsen-tool/src/app/_views/products/product-list/product-list.component.ts Wyświetl plik

@@ -47,7 +47,7 @@ export class ProductListComponent implements OnInit, AfterViewInit {
protected appHelperService: AppHelperService, protected appHelperService: AppHelperService,
) { ) {
this.sort = new MatSort(); 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.productsSub = new Subscription();
this.products = []; this.products = [];


+ 1
- 1
matsen-tool/src/app/_views/sales/sale-list/sale-list.component.html Wyświetl plik

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


+ 1
- 1
matsen-tool/src/app/_views/sales/sale-list/sale-list.component.ts Wyświetl plik

@@ -37,7 +37,7 @@ export class SaleListComponent implements OnInit, AfterViewInit {
protected accountService: AccountService, protected accountService: AccountService,
) { ) {
this.sort = new MatSort(); 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.salesSub = new Subscription();
this.sales = []; this.sales = [];
this.salesSummarySub = new Subscription(); this.salesSummarySub = new Subscription();


+ 1
- 2
matsen-tool/src/app/_views/sales/sale-summary/sale-summary.component.ts Wyświetl plik

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


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


+ 24
- 15
matsen-tool/src/app/_views/user/user-detail/user-detail.component.ts Wyświetl plik

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


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


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

this.isCurrentUser = false; this.isCurrentUser = false;

} }


ngOnInit() { 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 { 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.userSub = this.userService.usersIdGet(
this.userId
userId
).subscribe( ).subscribe(
data => { data => {
this.user = 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 Wyświetl plik

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


+ 1
- 1
matsen-tool/src/app/_views/user/user-list/user-list.component.ts Wyświetl plik

@@ -30,7 +30,7 @@ export class UserListComponent implements OnInit, AfterViewInit {
private router: Router, private router: Router,
protected appHelperService: AppHelperService, 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();


this.sort = new MatSort(); this.sort = new MatSort();


+ 1
- 0
matsen-tool/src/assets/scss/_button.scss Wyświetl plik

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


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


+ 6
- 1
matsen-tool/src/assets/scss/_table.scss Wyświetl plik

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


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

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

Ładowanie…
Anuluj
Zapisz