Tidying up

This commit is contained in:
Aaron Louie 2020-03-30 13:38:27 -04:00
parent ace852b732
commit 30b10f252a
6 changed files with 26 additions and 6 deletions

View File

@ -1,5 +1,7 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef} from '@angular/material/bottom-sheet'; import {MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef} from '@angular/material/bottom-sheet';
import {MatIconModule} from '@angular/material/icon';
import {MatListModule} from '@angular/material/list';
import { ApiErrorsComponent } from './api-errors.component'; import { ApiErrorsComponent } from './api-errors.component';
@ -9,7 +11,13 @@ describe('ApiErrorsComponent', () => {
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ ApiErrorsComponent ], declarations: [
ApiErrorsComponent
],
imports: [
MatIconModule,
MatListModule,
],
providers: [ providers: [
{ {
provide: MatBottomSheetRef, provide: MatBottomSheetRef,

View File

@ -203,7 +203,10 @@ export class DiagramComponent implements ControlValueAccessor, AfterViewInit {
this.modeler.on('commandStack.changed', () => this.saveDiagram()); this.modeler.on('commandStack.changed', () => this.saveDiagram());
this.modeler.on('views.changed', () => { this.modeler.on('views.changed', () => {
this.modeler.getActiveViewer().get('eventBus').on('commandStack.changed', () => this.saveDiagram()); const viewer = this.modeler.getActiveViewer();
if (viewer) {
viewer.get('eventBus').on('commandStack.changed', () => this.saveDiagram());
}
this.saveDiagram(); this.saveDiagram();
}); });

View File

@ -7,11 +7,11 @@
> >
<mat-icon (click)="editFile(fm)" mat-list-icon>{{fm.type | getIconCode}}</mat-icon> <mat-icon (click)="editFile(fm)" mat-list-icon>{{fm.type | getIconCode}}</mat-icon>
<ng-container *ngIf="fm.type === fileType.BPMN"> <ng-container *ngIf="fm.type === fileType.BPMN">
<button (click)="makePrimary(fm)" *ngIf="!fm.primary" mat-flat-button> <button (click)="makePrimary(fm)" *ngIf="!fm.primary" mat-flat-button class="make-primary">
<mat-icon>radio_button_unchecked</mat-icon> <mat-icon>radio_button_unchecked</mat-icon>
Make primary process Make primary process
</button> </button>
<button *ngIf="fm.primary" mat-flat-button> <button *ngIf="fm.primary" mat-flat-button class="make-primary">
<mat-icon>radio_button_checked</mat-icon> <mat-icon>radio_button_checked</mat-icon>
Primary process Primary process
</button> </button>

View File

@ -9,3 +9,8 @@
cursor: pointer; cursor: pointer;
} }
} }
.make-primary {
padding-right: 4rem;
margin-right: 4rem;
}

View File

@ -112,8 +112,6 @@ export class FileListComponent implements OnInit {
workflow_spec_id: this.workflowSpec.id, workflow_spec_id: this.workflowSpec.id,
}; };
console.log('data.fileMetaId', data.fileMetaId);
console.log('isNumberDefined(data.fileMetaId)', isNumberDefined(data.fileMetaId));
if (isNumberDefined(data.fileMetaId)) { if (isNumberDefined(data.fileMetaId)) {
// Update existing file // Update existing file
this.api.updateFileData(newFileMeta).subscribe(() => { this.api.updateFileData(newFileMeta).subscribe(() => {

View File

@ -23,3 +23,9 @@
} }
} }
} }
.workflow-spec-actions {
button {
margin-right: 1em;
}
}