Skip to content
Snippets Groups Projects
Commit 22d80533 authored by Kawtar Laariche's avatar Kawtar Laariche
Browse files

#22: Display dialog after successful onboarding model execution

parent a8cc5f76
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,7 @@ a {
}
.headerTxtSpan {
font-size: 14px;
font-size: 13px;
font-weight: 600;
color: #2e2f2f;
opacity: 1;
......
<mat-toolbar class="dialog-header">
<div style="display: flex; align-items: center; padding: 0; flex: 1 1 auto">
<h2>{{ title }}</h2>
</div>
<button
type="button"
mat-icon-button
[mat-dialog-close]="true"
class="close"
tabindex="-1"
>
<mat-icon aria-hidden="false" aria-label="Close icon">close</mat-icon>
</button>
</mat-toolbar>
<mat-dialog-content>
<div class="star-rating-container">
<p>
{{ content }}
</p>
</div></mat-dialog-content
>
<mat-toolbar class="form-footer">
<button mat-dialog-close mat-raised-button style="margin-right: auto">
Cancel
</button>
<button color="primary" mat-raised-button (click)="onClickSecondAction()">{{secondAction}}</button>
</mat-toolbar>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ConfirmActionComponent } from './confirm-action.component';
describe('ConfirmActionComponent', () => {
let component: ConfirmActionComponent;
let fixture: ComponentFixture<ConfirmActionComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ConfirmActionComponent]
})
.compileComponents();
fixture = TestBed.createComponent(ConfirmActionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, Inject, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
MAT_DIALOG_DATA,
MatDialogModule,
MatDialogRef,
} from '@angular/material/dialog';
import { MatButtonModule } from '@angular/material/button';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatIconModule } from '@angular/material/icon';
@Component({
selector: 'gp-confirm-action',
standalone: true,
imports: [
CommonModule,
MatDialogModule,
MatButtonModule,
MatToolbarModule,
MatIconModule,
],
templateUrl: './confirm-action.component.html',
styleUrl: './confirm-action.component.scss',
})
export class ConfirmActionComponent implements OnInit {
title!: string;
content!: string;
secondAction!: string;
constructor(
public dialogRef: MatDialogRef<ConfirmActionComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
) {}
ngOnInit(): void {
this.title = this.data.dataKey.title;
this.content = this.data.dataKey.content;
this.secondAction = this.data.dataKey.secondAction;
}
onClickSecondAction() {
this.data.dataKey.action().subscribe({
next: (res: any) => {
this.dialogRef.close(true);
},
error: (err: any) => {
this.dialogRef.close(false);
},
});
}
}
export interface PublicSolutionsRequestPayload {
userId?: string;
modelTypeCodes?: string[];
active?: boolean;
catalogIds?: string[];
......@@ -15,6 +16,7 @@ export interface PublicSolutionsRequestPayload {
size?: number;
};
}
export interface Solution {
name: string;
ownerName: string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment