Skip to content

Commit

Permalink
Change after review2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nkarmazina committed Dec 28, 2023
1 parent 20d033b commit 8d8d880
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
7 changes: 3 additions & 4 deletions frontend/src/app/Services/block.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,8 @@ export class BlockService {
scenario.stepDefinitions[s].push(JSON.parse(JSON.stringify(step)));
});
// Remove the block reference among the steps
if(stepReference == undefined || stepReference.stepType == s){
this.removeBlocksAmongSteps(scenario.stepDefinitions[s], block, stepReference);
}
this.removeBlocksAmongSteps(scenario.stepDefinitions[s], block, stepReference);

}
}
}
Expand Down Expand Up @@ -348,7 +347,7 @@ export class BlockService {
*/
removeBlocksAmongSteps(stepToSplice, block, stepReference? : StepType) {
const index = stepReference !== undefined
? stepToSplice.findIndex((element) => element.id === stepReference.id)
? stepToSplice.findIndex((element) => element.stepType === stepReference.stepType && element.id === stepReference.id )
: stepToSplice.findIndex((element) => element._blockReferenceId === block._id);

if (index > -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ td.mat-mdc-cell:first-of-type, td.mat-mdc-footer-cell:first-of-type{
display: flex;
align-items: center;
}
::ng-deep .wayToAddBlockDropDown .mat-mdc-form-field-infix{
padding-bottom: 3px!important;
}
#addAsReferenceCheckbox{
margin-left: 5px;
margin-right: 10px;
Expand All @@ -129,7 +126,7 @@ td.mat-mdc-cell:first-of-type, td.mat-mdc-footer-cell:first-of-type{
display: flex;
align-items: center;
}
.wayToAddBlock{
.addBlockDropDownDiv{
margin-bottom: 15px;
}
.mat-table{
Expand Down Expand Up @@ -165,11 +162,6 @@ td.mat-mdc-cell:first-of-type, td.mat-mdc-footer-cell:first-of-type{
background: #90CAF9;
}

::ng-deep .mat-mdc-form-field.wayToAddBlockDropDown .mat-mdc-select-value-text {
font-size: 15px !important;
margin-left: 8px !important;
}

::ng-deep.darkTheme h4 {
color: white !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
<div>
<label id="blockAddAslabel">Block will be added as: </label>
</div>
<div class="wayToAddBlock">
<mat-form-field appearance="standard" class="wayToAddBlockDropDown">
<div class="addBlockDropDownDiv">
<mat-form-field appearance="standard" class="addBlockDropDown">
<mat-select [formControl]="currentStepType">
<mat-option *ngFor="let wayToAdd of this.addBlockToStepType" [value]="wayToAdd">
{{wayToAdd}}
<mat-option *ngFor="let addBlockOption of this.addBlockToStepType" [value]="addBlockOption">
{{addBlockOption}}
</mat-option>
</mat-select>
</mat-form-field>
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,14 @@ mat-mdc-select{
height: 40px;
}

.addBlockDropDown .mat-mdc-form-field-infix{
padding-bottom: 3px;
}

.mat-mdc-form-field.addBlockDropDown .mat-mdc-select-value-text {
font-size: 15px;
margin-left: 8px;
}
.darkTheme .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text,
.darkTheme .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after,
.darkTheme .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {
Expand Down

0 comments on commit 8d8d880

Please sign in to comment.