Opti structure - remove any

version_2
floxx2112 2 years ago
parent be8f6fee51
commit dc25dc6da9
  1. 17
      src/app/app-routing.module.ts
  2. 24
      src/app/app.module.ts
  3. 0
      src/app/creation/columns-card/columns-card.component.html
  4. 0
      src/app/creation/columns-card/columns-card.component.scss
  5. 13
      src/app/creation/columns-card/columns-card.component.ts
  6. 0
      src/app/creation/create-joins-page/create-joins-page.component.html
  7. 0
      src/app/creation/create-joins-page/create-joins-page.component.scss
  8. 31
      src/app/creation/create-joins-page/create-joins-page.component.ts
  9. 0
      src/app/creation/joins-table/joins-table.component.html
  10. 0
      src/app/creation/joins-table/joins-table.component.scss
  11. 34
      src/app/creation/joins-table/joins-table.component.ts
  12. 0
      src/app/creation/where-card/where-card.component.html
  13. 0
      src/app/creation/where-card/where-card.component.scss
  14. 21
      src/app/creation/where-card/where-card.component.ts
  15. 0
      src/app/joins/joins-page/joins-page.component.html
  16. 0
      src/app/joins/joins-page/joins-page.component.scss
  17. 59
      src/app/joins/joins-page/joins-page.component.ts
  18. 0
      src/app/manager/add-script/add-script.component.html
  19. 0
      src/app/manager/add-script/add-script.component.scss
  20. 20
      src/app/manager/add-script/add-script.component.ts
  21. 0
      src/app/manager/edit-script/edit-script.component.html
  22. 0
      src/app/manager/edit-script/edit-script.component.scss
  23. 18
      src/app/manager/edit-script/edit-script.component.ts
  24. 0
      src/app/manager/script-management/script-management.component.html
  25. 0
      src/app/manager/script-management/script-management.component.scss
  26. 12
      src/app/manager/script-management/script-management.component.ts
  27. 0
      src/app/manager/tags-management/tags-management.component.html
  28. 0
      src/app/manager/tags-management/tags-management.component.scss
  29. 10
      src/app/manager/tags-management/tags-management.component.ts
  30. 0
      src/app/menu/navbar/navbar.component.html
  31. 0
      src/app/menu/navbar/navbar.component.scss
  32. 4
      src/app/menu/navbar/navbar.component.ts
  33. 48
      src/app/schemas-tab/schemas-tab.component.html
  34. 0
      src/app/schemas-tab/schemas-tab.component.scss
  35. 35
      src/app/schemas-tab/schemas-tab.component.ts
  36. 0
      src/app/search/request-page/request-page.component.html
  37. 0
      src/app/search/request-page/request-page.component.scss
  38. 53
      src/app/search/request-page/request-page.component.ts

@ -1,17 +1,15 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { SchemasTabComponent } from './schemas-tab/schemas-tab.component';
import { LandingPageComponent } from './landing-page/landing-page.component';
import { RequestPageComponent } from './request-page/request-page.component';
import { JoinsPageComponent } from './joins-page/joins-page.component';
import { CreateJoinsPageComponent } from './create-joins-page/create-joins-page.component';
import { ScriptManagementComponent } from './script-management/script-management.component';
import { AddScriptComponent } from './add-script/add-script.component';
import { EditScriptComponent } from './edit-script/edit-script.component';
import { TagsManagementComponent } from './tags-management/tags-management.component';
import { RequestPageComponent } from './search/request-page/request-page.component';
import { JoinsPageComponent } from './joins/joins-page/joins-page.component';
import { CreateJoinsPageComponent } from './creation/create-joins-page/create-joins-page.component';
import { ScriptManagementComponent } from './manager/script-management/script-management.component';
import { AddScriptComponent } from './manager/add-script/add-script.component';
import { EditScriptComponent } from './manager/edit-script/edit-script.component';
import { TagsManagementComponent } from './manager/tags-management/tags-management.component';
const routes: Routes = [
{ path: 'schematab', component: SchemasTabComponent },
{ path: '', component: LandingPageComponent },
{ path: 'request', component: RequestPageComponent },
{ path: 'joins', component: JoinsPageComponent },
@ -20,6 +18,7 @@ const routes: Routes = [
{ path: 'addscript', component: AddScriptComponent},
{ path: 'editscript', component: EditScriptComponent},
{ path: 'tagsmanagement', component: TagsManagementComponent},
{ path: '**', redirectTo: '', pathMatch: 'full'}
];
@NgModule({

@ -3,11 +3,10 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { SchemasTabComponent } from './schemas-tab/schemas-tab.component';
import { AppRoutingModule } from './app-routing.module';
import { LandingPageComponent } from './landing-page/landing-page.component';
import { NavbarComponent } from './navbar/navbar.component';
import { RequestPageComponent } from './request-page/request-page.component';
import { NavbarComponent } from './menu/navbar/navbar.component';
import { RequestPageComponent } from './search/request-page/request-page.component';
import { HttpClientModule } from '@angular/common/http';
import { EmployeeService } from './service/employee.service';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@ -17,18 +16,18 @@ import {MatDialogModule} from '@angular/material/dialog';
import { MatIconModule } from "@angular/material/icon";
import { Custom_Ng2SearchPipe } from './../Custom_Ng2SearchPipe';
import { FormsModule } from '@angular/forms';
import { JoinsPageComponent } from './joins-page/joins-page.component';
import { CreateJoinsPageComponent } from './create-joins-page/create-joins-page.component';
import { JoinsTableComponent } from './joins-table/joins-table.component';
import { WhereCardComponent } from './where-card/where-card.component';
import { ColumnsCardComponent } from './columns-card/columns-card.component';
import { JoinsPageComponent } from './joins/joins-page/joins-page.component';
import { CreateJoinsPageComponent } from './creation/create-joins-page/create-joins-page.component';
import { JoinsTableComponent } from './creation/joins-table/joins-table.component';
import { WhereCardComponent } from './creation/where-card/where-card.component';
import { ColumnsCardComponent } from './creation/columns-card/columns-card.component';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import { ScriptManagementComponent } from './script-management/script-management.component';
import { AddScriptComponent } from './add-script/add-script.component';
import { ScriptManagementComponent } from './manager/script-management/script-management.component';
import { AddScriptComponent } from './manager/add-script/add-script.component';
import { DndDirective } from './directives/dnd.directive'
import { CustomFilterScript } from 'src/CustomFilterScript';
import { EditScriptComponent } from './edit-script/edit-script.component';
import { TagsManagementComponent } from './tags-management/tags-management.component';
import { EditScriptComponent } from './manager/edit-script/edit-script.component';
import { TagsManagementComponent } from './manager/tags-management/tags-management.component';
import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';
import { CdkAccordionModule } from '@angular/cdk/accordion';
import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard';
@ -39,7 +38,6 @@ import {MatTooltipModule} from '@angular/material/tooltip';
@NgModule({
declarations: [
AppComponent,
SchemasTabComponent,
LandingPageComponent,
NavbarComponent,
RequestPageComponent,

@ -1,6 +1,6 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { InfoColumn } from '../model/info-column';
import { ColumnData } from '../model/column-data';
import { InfoColumn } from '../../model/info-column';
import { ColumnData } from '../../model/column-data';
@Component({
selector: 'app-columns-card',
@ -12,15 +12,16 @@ export class ColumnsCardComponent {
@Input() specificColumns: InfoColumn[] | undefined
@Input() childIndex: number | undefined;
@Output() selectedColumn = new EventEmitter<ColumnData>();
specificColumnData: any;
baseColumnData: any;
filterBaseColumn: any;
filterSpecificColumn: any;
specificColumnData: InfoColumn | undefined;
baseColumnData: InfoColumn | undefined;
filterBaseColumn: string = "";
filterSpecificColumn: string = "";
constructor(){}
public sendColumnsData(){
if(this.baseColumnData && this.specificColumnData){
console.log(this.baseColumnData, this.specificColumnData)
let tempsOpe = "AND";
if(this.childIndex === 0){
tempsOpe = "ON";

@ -1,14 +1,14 @@
import { HttpErrorResponse } from '@angular/common/http';
import { AfterViewInit, Component, OnInit, QueryList, ViewChildren } from '@angular/core';
import { InfoTable } from '../model/info-table';
import { InfoColumnService } from '../service/info-column.service';
import { InfoTableService } from '../service/info-table.service';
import { InfoTable } from '../../model/info-table';
import { InfoColumnService } from '../../service/info-column.service';
import { InfoTableService } from '../../service/info-table.service';
import { JoinsTableComponent } from '../joins-table/joins-table.component';
import { Join } from '../model/join';
import { Alias } from '../model/alias';
import { Join } from '../../model/join';
import { Alias } from '../../model/alias';
import { WhereCardComponent } from '../where-card/where-card.component';
import { Condition } from '../model/condition';
import { Condition } from '../../model/condition';
import { ClipboardModule } from '@angular/cdk/clipboard';
import { MatIconRegistry } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';
@ -23,25 +23,25 @@ export class CreateJoinsPageComponent implements OnInit, AfterViewInit{
@ViewChildren(WhereCardComponent)whereCardComponent!: QueryList<WhereCardComponent>;
public allSchema: String[] | undefined;
filterBaseSchema: any;
filterBaseTables: any;
filterBaseSchema: string = "";
filterBaseTables: string = "";
tablesByBaseSchema: InfoTable[] | undefined;
tablesByBaseSchemaAll: InfoTable[] | undefined;
tablesByBaseSchemaNoViews: InfoTable[] | undefined;
baseTableData: any;
baseTableData: InfoTable | undefined;
isChecked: boolean = false;
requestInfoJoin: Array<JoinsTableComponent> = [];
whereCardList: Array<WhereCardComponent> = [];
baseTableName: String = "";
baseTableName: string = "";
baseTableNameLowerCase: String = "";
oneJoinRemaining : boolean = true;
baseSchema: String | undefined;
baseSchema: string | undefined;
displayJoins: boolean = false;
allData: Join[] = [];
aliasData: Alias[] = [];
selectedAlias: String = "";
passSchema: String = "";
passTable: String = "";
selectedAlias: string = "";
passSchema: string = "";
passTable: string = "";
baseAlias: Alias | undefined;
memoAlias: Alias | undefined;
conditionData: Condition[] = [];
@ -134,7 +134,8 @@ export class CreateJoinsPageComponent implements OnInit, AfterViewInit{
public getNameBaseTable(){
let previousBaseAlias;
if(this.baseSchema){
if(this.baseSchema && this.baseTableData){
console.log(this.baseTableData)
this.baseTableName = this.baseTableData.nameTable;
this.baseTableNameLowerCase = this.baseTableName?.toLowerCase();
this.baseAlias = {

@ -1,12 +1,12 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, QueryList, ViewChildren } from '@angular/core';
import { InfoColumn } from '../model/info-column';
import { InfoTable } from '../model/info-table';
import { InfoColumnService } from '../service/info-column.service';
import { InfoTableService } from '../service/info-table.service';
import { Alias } from '../model/alias';
import { Join } from '../model/join';
import { ColumnData } from '../model/column-data';
import { InfoColumn } from '../../model/info-column';
import { InfoTable } from '../../model/info-table';
import { InfoColumnService } from '../../service/info-column.service';
import { InfoTableService } from '../../service/info-table.service';
import { Alias } from '../../model/alias';
import { Join } from '../../model/join';
import { ColumnData } from '../../model/column-data';
import { ColumnsCardComponent } from '../columns-card/columns-card.component';
@Component({
@ -21,22 +21,22 @@ export class JoinsTableComponent implements OnInit, OnChanges{
@Output() data = new EventEmitter<Join>();
@Output() selectedAlias = new EventEmitter<String>();
public allSchema: String[] | undefined;
filterBaseSchema: any;
filterBaseTables: any;
filterBaseSchema: string = "";
filterBaseTables: string = "";
isChecked: boolean = false;
filterAlias: any;
specificTableData: any;
filterAlias: string = "";
specificTableData: InfoTable | undefined;
tablesByBaseSchema: InfoTable[] | undefined;
tablesByBaseSchemaAll: InfoTable[] | undefined;
tablesByBaseSchemaNoViews: InfoTable[] | undefined;
joinData: any;
alljoins: String[] = ['INNER JOIN', 'LEFT JOIN', 'RIGHT JOIN', 'FULL JOIN'];
selectedSchema: String | undefined;
joinData: string | undefined;
alljoins: string[] = ['INNER JOIN', 'LEFT JOIN', 'RIGHT JOIN', 'FULL JOIN'];
selectedSchema: string | undefined;
columnsForSpecificTable: InfoColumn[] | undefined;
baseColumns: InfoColumn[] | undefined;
specificColumns: InfoColumn[] | undefined;
specificSchema: String | undefined;
specificTable: String | undefined;
specificSchema: string | undefined;
specificTable: string | undefined;
baseAlias: Alias | undefined;
myJoinData: Join | undefined;
isGood: boolean = true;
@ -129,6 +129,7 @@ export class JoinsTableComponent implements OnInit, OnChanges{
}
public getSpecificColumns():void {
if(this.specificTableData)
this.specificTable = this.specificTableData.nameTable;
if(this.specificSchema && this.specificTable){
this.infoColumnService.getSelectedColumns(this.specificSchema, this.specificTable).subscribe(
@ -143,6 +144,7 @@ export class JoinsTableComponent implements OnInit, OnChanges{
}
public verifyAndSendData(){
console.log(this.joinData)
if(this.specificSchema && this.specificTable && this.joinData && this.baseAlias && this.columnsData){
const tempLower = this.specificTable.toLowerCase();
this.myJoinData = {

@ -1,9 +1,9 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Alias } from '../model/alias';
import { InfoColumn } from '../model/info-column';
import { InfoColumnService } from '../service/info-column.service';
import { InfoTableService } from '../service/info-table.service';
import { Alias } from '../../model/alias';
import { InfoColumn } from '../../model/info-column';
import { InfoColumnService } from '../../service/info-column.service';
import { InfoTableService } from '../../service/info-table.service';
@Component({
selector: 'app-where-card',
@ -15,15 +15,15 @@ export class WhereCardComponent {
@Input() childIndex: number | undefined;
@Output() conditionData = new EventEmitter<String[]>();
operator: any
operatorList: String[] = ["AND", "OR"];
operator: string | undefined;
operatorList: string[] = ["AND", "OR"];
conditionValue: any;
conditionOperator: any;
filterAlias: any;
filterColumn: any;
filterAlias: string = "";
filterColumn: string = "";
baseAlias: Alias | undefined;
baseColumns: InfoColumn[] | undefined;
baseColumnData: any;
baseColumnData: InfoColumn | undefined;
constructor(
private infoColumnService: InfoColumnService,
@ -47,7 +47,8 @@ export class WhereCardComponent {
if(this.childIndex === 0){
this.operator = "WHERE";
}
if(this.operator && this.baseAlias && this.baseColumnData && this.baseColumnData && this.conditionOperator && this.conditionValue){
if(this.operator && this.baseAlias && this.baseColumnData && this.conditionOperator && this.conditionValue){
console.log(this.baseColumnData);
this.conditionData.emit([this.operator, this.baseAlias.nameAlias, this.baseColumnData.nameColumn, this.conditionOperator, this.conditionValue]);
}
}

@ -1,9 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { InfoColumnService } from '../service/info-column.service';
import { InfoTableService } from '../service/info-table.service';
import { InfoColumnService } from '../../service/info-column.service';
import { InfoTableService } from '../../service/info-table.service';
import { HttpErrorResponse } from '@angular/common/http';
import { InfoTable } from '../model/info-table';
import { InfoColumn } from '../model/info-column';
import { InfoTable } from '../../model/info-table';
import { InfoColumn } from '../../model/info-column';
@Component({
selector: 'app-joins-page',
@ -12,27 +12,27 @@ import { InfoColumn } from '../model/info-column';
})
export class JoinsPageComponent implements OnInit{
public allSchema: String[] | undefined;
filterFirstSchema: any;
filterSecondSchema: any;
filterFirstTable: any;
filterSecondTable: any;
filterColumn: any;
filterFirstSchema: string = "";
filterSecondSchema: string = "";
filterFirstTable: string = "";
filterSecondTable: string = "";
filterColumn: string = "";
public firstSchema: string | undefined;
public secondSchema: string | undefined;
public tablesByFirstSchema: InfoTable[] | undefined;
public tablesBySecondSchema: InfoTable[] | undefined;
firstTableData: any;
secondTableData: any;
firstTableData: InfoTable | undefined;
secondTableData: InfoTable | undefined;
public infoColumn: InfoColumn[] | undefined;
public columnIsFull: boolean = false;
public endRequestForColumns: boolean = false;
public displayColumns: InfoColumn | undefined;
public nameFirstTableLowerCase: String = "";
public nameSecondTableLowerCase: String = "";
public nameFirstTable: String = "";
public nameSecondTable: String = "";
public nameFirstTableLowerCase: string = "";
public nameSecondTableLowerCase: string = "";
public nameFirstTable: string = "";
public nameSecondTable: string = "";
public tables: string[] | undefined;
public schemas: string[] | undefined;
@ -90,19 +90,22 @@ export class JoinsPageComponent implements OnInit{
}
public displayColumnsInformations (event: any){
this.nameFirstTableLowerCase = this.firstTableData.nameTable.toLowerCase();
this.nameSecondTableLowerCase = this.secondTableData.nameTable.toLowerCase();
this.nameFirstTable = this.firstTableData.nameTable;
this.nameSecondTable = this.secondTableData.nameTable;
this.infoColumnService.getColumn(event.target.value).subscribe(
(response : InfoColumn) => {
this.displayColumns = response;
console.log(response);
},
(error: HttpErrorResponse) => {
alert(error.message)
}
);
if(this.firstTableData && this.secondTableData){
this.nameFirstTableLowerCase = this.firstTableData.nameTable.toLowerCase();
this.nameSecondTableLowerCase = this.secondTableData.nameTable.toLowerCase();
this.nameFirstTable = this.firstTableData.nameTable;
this.nameSecondTable = this.secondTableData.nameTable;
this.infoColumnService.getColumn(event.target.value).subscribe(
(response : InfoColumn) => {
this.displayColumns = response;
console.log(response);
},
(error: HttpErrorResponse) => {
alert(error.message)
}
);
}
}
public getColumnsForJoinTwo (){

@ -3,11 +3,11 @@ import { Component } from '@angular/core';
import { MatIconRegistry } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';
import { Observable, Subject } from 'rxjs';
import { Script } from '../model/script';
import { Script } from '../../model/script';
import { Router, RouterModule } from '@angular/router';
import { ScriptService } from '../service/script.service';
import { Tag } from '../model/tag';
import { TagsService } from '../service/tags.service';
import { ScriptService } from '../../service/script.service';
import { Tag } from '../../model/tag';
import { TagsService } from '../../service/tags.service';
@Component({
selector: 'app-add-script',
@ -15,12 +15,12 @@ import { TagsService } from '../service/tags.service';
styleUrls: ['./add-script.component.scss']
})
export class AddScriptComponent {
nameOfFile : String | undefined;
nameOfExtension : String | undefined;
listOfExtension : String[] = ["sql", "ps1", "txt", "bat"];
nameOfFile : string | undefined;
nameOfExtension : string | undefined;
listOfExtension : string[] = ["sql", "ps1", "txt", "bat"];
newFile : boolean = false;
newFileData: String | undefined;
existingFileData: String | undefined;
newFileData: string | undefined;
existingFileData: string | undefined;
files: File[] = [];
contentOfFiles: string[] = [];
scriptToSend: Script | undefined;
@ -28,7 +28,7 @@ export class AddScriptComponent {
selectedTagList: Tag[] = [];
dropdownSettings = {};
linkId: number | undefined;
description: String | undefined;
description: string | undefined;
constructor(
private scriptService: ScriptService,

@ -1,9 +1,9 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { ScriptService } from '../service/script.service';
import { Tag } from '../model/tag';
import { TagsService } from '../service/tags.service';
import { ScriptService } from '../../service/script.service';
import { Tag } from '../../model/tag';
import { TagsService } from '../../service/tags.service';
@Component({
selector: 'app-edit-script',
@ -11,16 +11,16 @@ import { TagsService } from '../service/tags.service';
styleUrls: ['./edit-script.component.scss']
})
export class EditScriptComponent {
defaultName: String | undefined;
newName: String | undefined;
newExtension: String | undefined;
newData: String | undefined;
defaultName: string | undefined;
newName: string | undefined;
newExtension: string | undefined;
newData: string | undefined;
editedId: number | undefined;
listOfExtension : String[] = ["sql", "ps1", "txt", "bat"];
dropdownTagList: Tag[] = [];
selectedTagList: Tag[] = [];
dropdownSettings = {};
description: String | undefined;
description: string | undefined;
constructor(private router: Router,
private scriptService: ScriptService,
@ -33,7 +33,7 @@ export class EditScriptComponent {
data: string,
linkId: number,
tags: Tag[],
description: String,
description: string,
};
const splitString = state.name.split(".");
this.defaultName = state.name;

@ -1,13 +1,13 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { ScriptService } from '../service/script.service';
import { Script } from '../model/script';
import { ScriptService } from '../../service/script.service';
import { Script } from '../../model/script';
import { MatIconRegistry } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';
import { Router, NavigationExtras } from '@angular/router';
import { TagsService } from '../service/tags.service';
import { Tag } from '../model/tag';
import { LinkScriptTag } from '../model/link-script-tag';
import { TagsService } from '../../service/tags.service';
import { Tag } from '../../model/tag';
import { LinkScriptTag } from '../../model/link-script-tag';
@Component({
@ -22,7 +22,7 @@ export class ScriptManagementComponent implements OnInit {
allScripts: Script[] = [];
memoryScripts: Script[] = [];
allLinksScriptTag: LinkScriptTag[]= [];
filterScriptName: any;
filterScriptName: string = "";
dropdownTagList: Tag[] = [];
selectedTagList: Tag[] = [];
dropdownSettings = {};

@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { TagsService } from '../service/tags.service';
import { TagsService } from '../../service/tags.service';
import { HttpErrorResponse } from '@angular/common/http';
import { Tag } from '../model/tag';
import { Tag } from '../../model/tag';
@Component({
selector: 'app-tags-management',
@ -10,14 +10,14 @@ import { Tag } from '../model/tag';
})
export class TagsManagementComponent implements OnInit{
allTags: Tag[]= [];
filterTag: any;
filterTag: string = "";
nameOfTag: string | undefined;
descOfTag: string | undefined;
addPress: boolean = false;
modifyPress: boolean = false;
previousId: number | undefined
previousName: String | undefined;
previousDesc: String | undefined;
previousName: string | undefined;
previousDesc: string | undefined;
modifyName: string | undefined;
modifyDesc: string | undefined;

@ -1,8 +1,8 @@
import { HttpErrorResponse } from '@angular/common/http';
import { Component } from '@angular/core';
import { ResetDataService } from '../service/reset_data.service';
import { ResetDataService } from '../../service/reset_data.service';
import { Router, RouterModule } from '@angular/router';
import { AppRoutingModule } from '../app-routing.module';
import { AppRoutingModule } from '../../app-routing.module';
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
@Component({

@ -1,48 +0,0 @@
<div class="p-10 grid grid-cols-1 sm:grid-cols-1 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-5">
<!--Card 1-->
<div class="rounded-lg overflow-hidden shadow-lg bg-white">
<img class="w-full" src="/mountain.jpg" alt="Mountain">
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2">Mountain</div>
<p class="text-gray-700 text-base">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, Nonea! Maiores et perferendis eaque, exercitationem praesentium nihil.
</p>
</div>
<div class="px-6 pt-4 pb-2">
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#photography</span>
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#travel</span>
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#winter</span>
</div>
</div>
<!--Card 2-->
<div class="rounded-lg overflow-hidden shadow-lg bg-white">
<img class="w-full" src="/river.jpg" alt="River">
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2">River</div>
<p class="text-gray-700 text-base">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, Nonea! Maiores et perferendis eaque, exercitationem praesentium nihil.
</p>
</div>
<div class="px-6 pt-4 pb-2">
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#photography</span>
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#travel</span>
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#summer</span>
</div>
</div>
<!--Card 3-->
<div class="rounded-lg overflow-hidden shadow-lg bg-white">
<img class="w-full" src="/forest.jpg" alt="Forest">
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2">Forest</div>
<p class="text-gray-700 text-base">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, Nonea! Maiores et perferendis eaque, exercitationem praesentium nihil.
</p>
</div>
<div class="px-6 pt-4 pb-2">
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#photography</span>
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#travel</span>
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mb-2">#fall</span>
</div>
</div>
</div>

@ -1,35 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-schemas-tab',
templateUrl: './schemas-tab.component.html',
styleUrls: ['./schemas-tab.component.scss']
})
export class SchemasTabComponent implements OnInit{
title!: string;
description!: string;
createdDate!: Date;
snaps!: number;
imageUrl!: string;
buttonText!: string
ngOnInit(){
this.title = 'FirstTest';
this.description = 'FirstDescription';
this.createdDate = new Date();
this.snaps = 10;
this.imageUrl = '/assets/images/apsidetop.png';
this.buttonText = 'Add Like';
}
onLike(){
if(this.buttonText === 'Add Like'){
this.snaps++;
this.buttonText = 'Unlike';
} else {
this.snaps--;
this.buttonText = "Add Like";
}
}
}

@ -1,12 +1,12 @@
import { HttpErrorResponse } from '@angular/common/http';
import {FormBuilder, Validators} from '@angular/forms';
import { Component, Input, OnInit } from '@angular/core';
import { Employee } from '../model/employee';
import { EmployeeService } from '../service/employee.service';
import { InfoTable } from '../model/info-table';
import { InfoTableService } from '../service/info-table.service';
import { InfoColumn } from '../model/info-column';
import { InfoColumnService } from '../service/info-column.service';
import { Employee } from '../../model/employee';
import { EmployeeService } from '../../service/employee.service';
import { InfoTable } from '../../model/info-table';
import { InfoTableService } from '../../service/info-table.service';
import { InfoColumn } from '../../model/info-column';
import { InfoColumnService } from '../../service/info-column.service';
import { MatStepperModule } from '@angular/material/stepper';
@Component({
@ -24,12 +24,12 @@ export class RequestPageComponent implements OnInit {
public displayColumns: InfoColumn | undefined;
public currentTable: InfoTable | undefined;
public selectedSchema: String | undefined;
filterSchema: any;
filterTable: any;
filterColumn: any;
tableData: any;
filterSchema: string = "";
filterTable: string = "";
filterColumn: string = "";
tableData: InfoTable | undefined;
schemaData: any;
schemaName: any;;
schemaName: String | undefined;
firstFormGroup = this._formBuilder.group({
firstCtrl: ['', Validators.required],
@ -110,12 +110,9 @@ export class RequestPageComponent implements OnInit {
if(this.schemaName){
this.selectedSchema = this.schemaName;
} else {
console.log(this.schemaData)
this.selectedSchema = this.schemaData.nameSchema;
}
// this.displayColumns = undefined;
// this.currentTable = undefined;
// this.infoColumn = undefined;
if(this.selectedSchema){
this.infoTableService.getTablesBySchema(this.selectedSchema).subscribe(
(response : InfoTable[]) => {
@ -132,19 +129,21 @@ export class RequestPageComponent implements OnInit {
}
public useSchemaWithTableName (){
this.infoTableService.getSchemasByTable(this.tableData.nameTable).subscribe(
(response : InfoTable[]) => {
this.schemasByTable = response;
console.log(response);
},
(error: HttpErrorResponse) => {
alert(error.message)
if(this.tableData){
this.infoTableService.getSchemasByTable(this.tableData.nameTable).subscribe(
(response : InfoTable[]) => {
this.schemasByTable = response;
console.log(response);
},
(error: HttpErrorResponse) => {
alert(error.message)
}
);
if(this.selectedSchema){
this.divideColumns(this.selectedSchema, this.tableData);
}
);
if(this.selectedSchema){
this.divideColumns(this.selectedSchema, this.tableData);
this.schemaName = undefined;
}
this.schemaName = null;
}
public resetColumnsInformations(){
@ -158,7 +157,7 @@ export class RequestPageComponent implements OnInit {
this.displayColumns = undefined;
this.infoColumn = undefined;
this.currentTable = undefined;
this.tableData = null;
this.tableData = undefined;
}
}
Loading…
Cancel
Save