diff --git a/workbench/frontend/src/app/app.module.ts b/workbench/frontend/src/app/app.module.ts
index 737918a..d2b02b9 100644
--- a/workbench/frontend/src/app/app.module.ts
+++ b/workbench/frontend/src/app/app.module.ts
@@ -38,7 +38,6 @@ import { ResourceQueryComponent } from './common/components/resource-query/resou
import { SaveDialog } from './common/components/plugin-editor/save-dialog/save-dialog.component';
import { SelectSheet } from './common/components/select-sheet/select-sheet.component';
import { PluginEditorComponent } from './common/components/plugin-editor/plugin-editor.component';
-import { MatRadioModule } from '@angular/material/radio';
@NgModule({
@@ -67,7 +66,6 @@ import { MatRadioModule } from '@angular/material/radio';
MonacoEditorModule.forRoot(ngxMonacoEditorConfig),
FlexLayoutModule,
...MatModules,
- MatRadioModule,
FormsModule
],
providers: [
diff --git a/workbench/frontend/src/app/common/components/resource-query/resource-query.component.html b/workbench/frontend/src/app/common/components/resource-query/resource-query.component.html
index 1957e54..43c8de7 100755
--- a/workbench/frontend/src/app/common/components/resource-query/resource-query.component.html
+++ b/workbench/frontend/src/app/common/components/resource-query/resource-query.component.html
@@ -37,8 +37,8 @@
Query Templates:
- Crowd
- Internal
+ Crowd
+ Internal
@@ -52,23 +52,6 @@ Query Templates:
-
-
-
diff --git a/workbench/frontend/src/app/common/components/resource-query/resource-query.component.scss b/workbench/frontend/src/app/common/components/resource-query/resource-query.component.scss
index ad9037f..dd8227e 100644
--- a/workbench/frontend/src/app/common/components/resource-query/resource-query.component.scss
+++ b/workbench/frontend/src/app/common/components/resource-query/resource-query.component.scss
@@ -1,17 +1,17 @@
.selected {
- background-color: #e0e0e0; /* Greyish color for selected tab */
- color: #333; /* Adjust text color for better contrast */
- border-bottom: 3px solid #ccc; /* Border color for selected tab */
+ background-color: #e0e0e0;
+ color: #333;
+ border-bottom: 3px solid #ccc;
}
.mat-button {
- transition: background-color 0.3s; /* Add a smooth transition for background color */
+ transition: background-color 0.3s;
}
.mat-button:not(.selected):hover {
- background-color: #e0e0e0; /* Change background color on hover for non-selected buttons */
+ background-color: #e0e0e0;
}
.selected:hover {
- background-color: #e0e0e0; /* Change background color on hover for non-selected buttons */
+ background-color: #e0e0e0;
}
diff --git a/workbench/frontend/src/app/common/components/resource-query/resource-query.component.ts b/workbench/frontend/src/app/common/components/resource-query/resource-query.component.ts
index ac8412c..64bb9ba 100644
--- a/workbench/frontend/src/app/common/components/resource-query/resource-query.component.ts
+++ b/workbench/frontend/src/app/common/components/resource-query/resource-query.component.ts
@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
-import { BehaviorSubject, merge, Observable, of, Subject } from 'rxjs';
+import { BehaviorSubject, merge, of, Subject } from 'rxjs';
import { catchError, map, mergeMap, take, takeUntil, tap, withLatestFrom } from 'rxjs/operators';
import { QueryService } from '../../services/query.service';
import { SharedSkillsService } from '../../services/shared-skill.service';
@@ -165,7 +165,7 @@ export class ResourceQueryComponent implements OnInit, OnDestroy {
public removeSkill(skill: string): void {
this.sharedSkillsService.selectedSkills$.pipe(
- take(1), // Take only one emission to avoid unnecessary subscriptions
+ take(1),
map((selectedSkills) => selectedSkills.filter((s) => s !== skill))
).subscribe((updatedSkills) => {
this.selectedSkills$.next(updatedSkills);
@@ -199,17 +199,27 @@ export class ResourceQueryComponent implements OnInit, OnDestroy {
}
}
+
+ public switchCrowdInternal(changed: string): void {
+ if (changed === 'CROWD' && this.crowdChecked) {
+ this.internalChecked = false;
+ }
+ else if (changed === 'INTERNAL' && this.internalChecked) {
+ this.crowdChecked = false;
+ }
+
+ this.updateSqlCode();
+ }
+
public updateSqlCode(): void {
const updateCondition = (conditionToAdd: string, include: boolean): void => {
const query = this.form.value.query;
if (query.trim() !== '') {
if (include) {
- // If including, add the new condition
const updatedQuery = this.insertTextAfterWhere(query, conditionToAdd);
this.form.patchValue({ query: updatedQuery });
} else {
- // If excluding, remove the existing condition
const modifiedQuery = this.removeCondition(query, conditionToAdd);
this.form.patchValue({ query: modifiedQuery });
}
@@ -221,7 +231,7 @@ export class ResourceQueryComponent implements OnInit, OnDestroy {
}
private insertTextAfterWhere(input: string, newText: string): string {
- const whereRegex = /\bWHERE\b/i; // case-insensitive match for WHERE
+ const whereRegex = /\bWHERE\b/i;
const whereMatch = whereRegex.exec(input);
if (whereMatch) {
@@ -236,6 +246,4 @@ export class ResourceQueryComponent implements OnInit, OnDestroy {
private removeCondition(query: string, conditionToRemove: string): string {
return query.replace(conditionToRemove, '');
}
-
-
}
diff --git a/workbench/frontend/src/app/common/services/shared-skill.service.ts b/workbench/frontend/src/app/common/services/shared-skill.service.ts
index 2f4a587..ddcf4ff 100644
--- a/workbench/frontend/src/app/common/services/shared-skill.service.ts
+++ b/workbench/frontend/src/app/common/services/shared-skill.service.ts
@@ -1,4 +1,3 @@
-// shared-skills.service.ts
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
diff --git a/workbench/frontend/src/app/slot-booking/slot-booking.component.scss b/workbench/frontend/src/app/slot-booking/slot-booking.component.scss
index a85805e..82c08b4 100644
--- a/workbench/frontend/src/app/slot-booking/slot-booking.component.scss
+++ b/workbench/frontend/src/app/slot-booking/slot-booking.component.scss
@@ -50,10 +50,3 @@
margin-left: 3px;
font-size: 9px;
}
-
-.highlighted-resources {
- background-color: khaki;
- display: block;
- padding-top: 8px;
- padding-bottom: 8px;
-}