Skip to content

Commit

Permalink
Client: Fix bug due to stockevents permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
a-jaillet authored and Embraser01 committed Feb 8, 2021
1 parent 68372d0 commit 2f607e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { setHours } from 'date-fns';
import * as PDFJS from 'pdfjs-dist/build/pdf';
import PDFJSWorker from 'pdfjs-dist/build/pdf.worker.entry';
import { ToasterService } from 'src/app/core/services/toaster.service';

@Injectable()

Expand All @@ -14,6 +15,9 @@ export class ParseService {
csvtext = "";
fileReader = new FileReader();

constructor(
private readonly toasterService: ToasterService,
) {}

async fromFilestoText(invoices: File[]): Promise<void> {
this.listarticle = [];
Expand Down Expand Up @@ -69,6 +73,7 @@ export class ParseService {
}
});
if(errorInCsv){
this.toasterService.showToaster('Erreur durant le parsing du fichier. Chaque ligne ne contient pas exactement 3 colonnes \n Check les virgules (pas autorisées)');
this.listarticle = [];
this.articleSum = [];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1>Liste des évènements</h1>
<mat-cell *matCellDef="let stockEvent">
<div fxLayout="row">
<button mat-icon-button (click)="edit(stockEvent)"
*ngxPermissionsOnly="['inventory-management:stock-events:create']">
*ngxPermissionsOnly="['inventory-management:stock-events:add']">
<mat-icon>edit</mat-icon>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const routes: Routes = [
path: ':id/edit',
component: EditComponent,
canActivate: [NgxPermissionsGuard],
data: { permissions: { only: ['inventory-management:stock-events:create'] } },
data: { permissions: { only: ['inventory-management:stock-events:add'] } },
resolve: {
stockEvent: StockEventDetailResolverService
}
Expand Down

0 comments on commit 2f607e0

Please sign in to comment.