disable QuickWizard SingleAutoComplete to change DatasetProfile if Has Datasets
And refactor create-add Page UI
This commit is contained in:
parent
2b7d663830
commit
0d7d38278d
|
@ -3,8 +3,8 @@ import { CommonUiModule } from '../../common/ui/common-ui.module';
|
|||
import { CardComponent } from './card/card.component';
|
||||
import { DashboardComponent } from './dashboard.component';
|
||||
import { DashboardRoutingModule } from './dashboard.routing';
|
||||
import { RecentActivityComponent } from './recent-activity/recent-activity.component';
|
||||
import { QuickWizardCreateAdd } from './quick-wizard-create-add/quick-wizard-create-add.component';
|
||||
import { RecentActivityComponent } from './recent-activity/recent-activity.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
|
@ -1,45 +1,24 @@
|
|||
<div class="dashboard" id="main-panel">
|
||||
<div class="dashboard" id=panel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-1"></div>
|
||||
<div class="col-4">
|
||||
|
||||
<div class="figure-card card">
|
||||
<div class="card-header" (click)="navigateToCreate()"
|
||||
[ngStyle]="{ 'background': linearCreateColor, 'box-shadow': boxShadow }">
|
||||
<i class="material-icons">mode_edit</i>
|
||||
<div class="col-2"></div>
|
||||
<div class="col-8 ">
|
||||
<div class="row conteiner">
|
||||
<div class="col">
|
||||
<a mat-button class="buttonNav navbar-button figure-card card" routerLink="/quick-wizard">
|
||||
<h3 class="title">{{'QUICKWIZARD.CREATE-ADD.CREATE.TITLE' | translate}}</h3>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<p class="category">{{ category | translate }}</p>
|
||||
<h3 class="title">{{'QUICKWIZARD.CREATE-ADD.CREATE.TITLE' | translate}}</h3>
|
||||
<!-- <button mat-raised-button color="primary" (click)="navigateToCreate()">
|
||||
<mat-icon>create_new_folder</mat-icon>
|
||||
</button> -->
|
||||
<div class="col-auto">
|
||||
<div class="vl"></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a mat-button class="buttonNav navbar-button figure-card card" routerLink="/datasetcreatewizard">
|
||||
<h3 class="title">{{'QUICKWIZARD.CREATE-ADD.ADD.TITLE' | translate}}</h3>
|
||||
</a>
|
||||
</div>
|
||||
<!-- <div *ngIf="hasFootContent" class="card-footer">
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-1"></div>
|
||||
<div class="col-4">
|
||||
|
||||
<div class="figure-card card">
|
||||
<div class="card-header" (click)="navigateToAdd()"
|
||||
[ngStyle]="{ 'background': linearAddColor, 'box-shadow': boxShadow }">
|
||||
<i class="material-icons">subject</i>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<p class="category">{{ category | translate }}</p>
|
||||
<h3 class="title">{{'QUICKWIZARD.CREATE-ADD.ADD.TITLE' | translate}}</h3>
|
||||
<!-- <button mat-raised-button color="primary" (click)="createNew()">
|
||||
<mat-icon>create_new_folder</mat-icon>
|
||||
</button> -->
|
||||
</div>
|
||||
<!-- <div *ngIf="hasFootContent" class="card-footer">
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-1"></div>
|
||||
<div class="com-2"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -66,3 +66,16 @@
|
|||
color: rgba(0, 0, 0, 0.87);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.vl {
|
||||
border-left: solid #999;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.conteiner{
|
||||
padding: 1em;
|
||||
background-color: #eef1f5;
|
||||
}
|
|
@ -29,7 +29,7 @@
|
|||
<mat-form-field class="col-12">
|
||||
<app-single-auto-complete [required]='true' [formControl]="formGroup.get('datasetProfile')"
|
||||
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.PROFILE' | translate}}"
|
||||
[configuration]="profilesAutoCompleteConfiguration" [disabled]="dataseteIsEmpty()">
|
||||
[configuration]="profilesAutoCompleteConfiguration" [disabled]="datasetIsEmpty()">
|
||||
</app-single-auto-complete>
|
||||
<mat-error *ngIf="formGroup.get('datasetProfile').hasError('backendError')">
|
||||
{{formGroup.get('datasetProfile').getError('backendError').message}}</mat-error>
|
||||
|
|
|
@ -154,7 +154,7 @@ export class DmpEditorWizardComponent extends BaseComponent implements OnInit, I
|
|||
return this._service.searchDMPProfiles(request);
|
||||
}
|
||||
|
||||
dataseteIsEmpty() {
|
||||
datasetIsEmpty() {
|
||||
if (this.datasetFormGroup && this.datasetFormGroup.get('datasetsList') && (this.datasetFormGroup.get('datasetsList') as FormArray).length != 0) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue