parent
cc47e34572
commit
99791e3b2e
@ -1,80 +1,74 @@ |
|||||||
|
|
||||||
<!--Card--> |
<!--Card--> |
||||||
<div class="my-4"> |
|
||||||
|
|
||||||
<div class="flex sm:flex-nowrap flex-wrap sm:space-x-4"> |
<div class="flex sm:flex-nowrap flex-wrap sm:space-x-4 my-4"> |
||||||
<div class="w-full sm:w-2/3 h-full text-center rounded-lg overflow-hidden shadow-lg bg-white p-4 "> |
<div class="w-full sm:w-2/3 h-full text-center rounded-lg overflow-hidden shadow-lg bg-white p-4 "> |
||||||
<div class="rounded-lg overflow-hidden shadow-lg bg-slate-100 border-solid border-orange-400 border-2"> |
<div class="rounded-lg overflow-hidden shadow-lg bg-slate-100 border-solid border-orange-400 border-2 p-4"> |
||||||
<div class="p-4"> |
|
||||||
<div class="font-bold text-xl text-left">Selectionner un Schéma et une Table (Base) :</div> |
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4"> |
|
||||||
<div class="mt-2"> |
|
||||||
<label class="text-black text-left">Schémas : </label> |
|
||||||
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterBaseSchema" placeholder="Rechercher..."> |
|
||||||
|
|
||||||
<select (change)="useTablesWithBaseSchema($event)" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
<div class="font-bold text-xl text-left">Selectionner un Schéma et une Table (Base) :</div> |
||||||
<option *ngFor="let schema of allSchema | filter : filterBaseSchema" value="{{ schema }}">{{ schema }}</option> |
|
||||||
</select> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div *ngIf="tablesByBaseSchema" class="mt-2"> |
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4"> |
||||||
<label *ngIf="!isChecked" class="text-black text-left">Tables : </label> |
<div class="mt-2"> |
||||||
<label *ngIf="isChecked" class="text-black text-left">Tables et Vues : </label> |
<label class="text-black text-left">Schémas : </label> |
||||||
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterBaseTables" placeholder="Rechercher..."> |
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterBaseSchema" placeholder="Rechercher..."> |
||||||
|
|
||||||
<select [(ngModel)]="baseTableData" (change)="getNameBaseTable()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
<select (change)="useTablesWithBaseSchema($event)" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
<option *ngFor="let table of tablesByBaseSchema | filter : filterBaseTables" id="{{ table.id }}" [ngValue]="table">{{ table.nameTable }}</option> |
<option *ngFor="let schema of allSchema | filter : filterBaseSchema" value="{{ schema }}">{{ schema }}</option> |
||||||
</select> |
</select> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
|
||||||
|
|
||||||
<div *ngIf="tablesByBaseSchema"> |
|
||||||
<input type="checkbox" [(ngModel)]="isChecked" (change)="checkValue(isChecked?'true':'false')" class="w-4 h-4 text-orange-400 bg-slate-400 border-slate-200 rounded focus:ring-orange-400 focus:ring-2"/> |
|
||||||
<label class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Afficher aussi les Vues</label> |
|
||||||
</div> |
|
||||||
|
|
||||||
|
<div *ngIf="tablesByBaseSchema" class="mt-2"> |
||||||
|
<label *ngIf="!isChecked" class="text-black text-left">Tables : </label> |
||||||
|
<label *ngIf="isChecked" class="text-black text-left">Tables et Vues : </label> |
||||||
|
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterBaseTables" placeholder="Rechercher..."> |
||||||
|
|
||||||
</div> |
<select [(ngModel)]="baseTableData" (change)="getNameBaseTable()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
|
<option *ngFor="let table of tablesByBaseSchema | filter : filterBaseTables" id="{{ table.id }}" [ngValue]="table">{{ table.nameTable }}</option> |
||||||
|
</select> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div *ngIf="tablesByBaseSchema"> |
||||||
|
<input type="checkbox" [(ngModel)]="isChecked" (change)="checkValue(isChecked?'true':'false')" class="w-4 h-4 text-orange-400 bg-slate-400 border-slate-200 rounded focus:ring-orange-400 focus:ring-2"/> |
||||||
|
<label class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Afficher aussi les Vues</label> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
|
||||||
</div> |
<div *ngIf="baseTableName"> |
||||||
<div *ngIf="baseTableName"> |
<div *ngFor="let hop of requestInfoJoin; index as i" > |
||||||
<div *ngFor="let hop of requestInfoJoin; index as i" > |
<app-joins-table [allAlias]="aliasData" [passJoinData]="allData[i]" (data)="retrieveData($event, i)" id="{{hop}}"></app-joins-table> |
||||||
<app-joins-table [allAlias]="aliasData" [passJoinData]="allData[i]" (data)="retrieveData($event, i)" id="{{hop}}"></app-joins-table> |
<div class="sm:inline-flex sm:space-x-4"> |
||||||
<div class="sm:inline-flex sm:space-x-4"> |
<button (click)="addTable()" type="button" class="text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Ajouter une Jointure</button> |
||||||
<button (click)="addTable()" type="button" class="text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Ajouter une Jointure</button> |
|
||||||
|
|
||||||
<button *ngIf="!oneJoinRemaining" (click)="removeTable(i)" type="button" class="text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-red-100 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Supprimer cette jointure</button> |
<button *ngIf="!oneJoinRemaining" (click)="removeTable(i)" type="button" class="text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-red-100 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Supprimer cette jointure</button> |
||||||
|
|
||||||
<button (click)="addCondition()" type="button" class="text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Ajouter une Condition</button> |
<button (click)="addCondition()" type="button" class="text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Ajouter une Condition</button> |
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div *ngIf="whereCardList.length != 0"> |
<div *ngIf="whereCardList.length != 0"> |
||||||
<div *ngFor="let whereCards of whereCardList; index as i" > |
<div *ngFor="let whereCards of whereCardList; index as i" > |
||||||
<app-where-card [allAlias]="aliasData" [childIndex]="i" id="{{whereCards}}" (conditionData)="getConditionData($event, i)"></app-where-card> |
<app-where-card [allAlias]="aliasData" [childIndex]="i" id="{{whereCards}}" (conditionData)="getConditionData($event, i)"></app-where-card> |
||||||
<div class="sm:inline-flex sm:space-x-4"> |
<div class="sm:inline-flex sm:space-x-4"> |
||||||
<button (click)="addCondition()" type="button" class="text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Ajouter une Condition</button> |
<button (click)="addCondition()" type="button" class="text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Ajouter une Condition</button> |
||||||
|
|
||||||
<button (click)="removeWhereCard(i)" type="button" class="text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Supprimer cette Condition</button> |
<button (click)="removeWhereCard(i)" type="button" class="text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2">Supprimer cette Condition</button> |
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="sticky top-20 w-full mt-2 sm:mt-0 sm:w-1/3 h-full text-center rounded-lg overflow-hidden shadow-lg bg-white p-4 "> |
<div class="sticky top-20 w-full mt-2 sm:mt-0 sm:w-1/3 h-full text-center rounded-lg overflow-hidden shadow-lg bg-white p-4 "> |
||||||
<div class="flex justify-between mb-2"> |
<div class="flex justify-between mb-2"> |
||||||
<div class="text-xl font-bold">Résultat de la requête :</div> |
<div class="text-xl font-bold">Résultat de la requête :</div> |
||||||
<mat-icon matTooltip="Copier la requête" [cdkCopyToClipboard]="newRequestData" class="text-green-400 ml-2 hover:cursor-pointer" svgIcon="copy"></mat-icon> |
<mat-icon matTooltip="Copier la requête" [cdkCopyToClipboard]="newRequestData" class="text-green-400 ml-2 hover:cursor-pointer" svgIcon="copy"></mat-icon> |
||||||
</div> |
</div> |
||||||
<div class="rounded-lg overflow-hidden shadow-lg bg-slate-900 text-white text-left pl-2">{{newRequestData}} |
<div class="rounded-lg overflow-hidden shadow-lg bg-slate-900 text-white text-left pl-2">{{newRequestData}} |
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
</div> |
|
||||||
|
|
||||||
|
@ -1,57 +1,55 @@ |
|||||||
<div [ngClass]="{'normalCard' : goodAlias, 'alternativeCard' : !goodAlias}"> |
<div [ngClass]="{'normalCard' : goodAlias, 'alternativeCard' : !goodAlias}" class="p-4"> |
||||||
<div class="p-4"> |
<div class="font-bold text-xl text-left mb-2">Selectionner les informations de la jointure :</div> |
||||||
<div class="font-bold text-xl text-left mb-2">Selectionner les informations de la jointure :</div> |
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4"> |
||||||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4"> |
|
||||||
|
<div> |
||||||
<div> |
<label class="text-black text-left">Jointures : </label> |
||||||
<label class="text-black text-left">Jointures : </label> |
<select [(ngModel)]="joinData" (change)="verifyAndSendData()" size="4" class="my-2 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
<select [(ngModel)]="joinData" (change)="verifyAndSendData()" size="4" class="my-2 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
<option *ngFor="let join of alljoins" [ngValue]="join">{{ join }}</option> |
||||||
<option *ngFor="let join of alljoins" [ngValue]="join">{{ join }}</option> |
</select> |
||||||
</select> |
</div> |
||||||
</div> |
|
||||||
|
<div> |
||||||
<div> |
<label class="text-black text-left">Schémas : </label> |
||||||
<label class="text-black text-left">Schémas : </label> |
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterBaseSchema" placeholder="Rechercher..."> |
||||||
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterBaseSchema" placeholder="Rechercher..."> |
|
||||||
|
<select (change)="useTablesWithSpecificSchema($event)" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
<select (change)="useTablesWithSpecificSchema($event)" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
<option *ngFor="let schema of allSchema | filter : filterBaseSchema" value="{{ schema }}">{{ schema }}</option> |
||||||
<option *ngFor="let schema of allSchema | filter : filterBaseSchema" value="{{ schema }}">{{ schema }}</option> |
</select> |
||||||
</select> |
</div> |
||||||
</div> |
|
||||||
|
<div> |
||||||
<div> |
<label class="text-black text-left">Tables : </label> |
||||||
<label class="text-black text-left">Tables : </label> |
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterBaseTables" placeholder="Rechercher..."> |
||||||
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterBaseTables" placeholder="Rechercher..."> |
|
||||||
|
|
||||||
<select [(ngModel)]="specificTableData" (change)="getSpecificColumns()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
|
||||||
<option *ngFor="let table of tablesByBaseSchema | filter : filterBaseTables" id="{{ table.id }}" [ngValue]="table">{{ table.nameTable }}</option> |
|
||||||
</select> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div *ngIf="allAlias"> |
|
||||||
<label class="text-black text-left">Alias(Base) : </label> |
|
||||||
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterAlias" placeholder="Rechercher..."> |
|
||||||
|
|
||||||
<select [(ngModel)]="baseAlias" (change)="getBaseColumns()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
|
||||||
<option *ngFor="let alias of tempAliasData | filter : filterAlias" [ngValue]="alias">{{ alias.nameAlias }}</option> |
|
||||||
</select> |
|
||||||
</div> |
|
||||||
|
|
||||||
|
<select [(ngModel)]="specificTableData" (change)="getSpecificColumns()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
|
<option *ngFor="let table of tablesByBaseSchema | filter : filterBaseTables" id="{{ table.id }}" [ngValue]="table">{{ table.nameTable }}</option> |
||||||
|
</select> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div *ngIf="tablesByBaseSchema" class="mb-2"> |
<div *ngIf="allAlias"> |
||||||
<input type="checkbox" [(ngModel)]="isChecked" (change)="checkValue(isChecked?'true':'false')" class="w-4 h-4 text-orange-400 bg-slate-400 border-slate-200 rounded focus:ring-orange-400 focus:ring-2"/> |
<label class="text-black text-left">Alias(Base) : </label> |
||||||
<label class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Afficher aussi les Vues</label> |
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterAlias" placeholder="Rechercher..."> |
||||||
|
|
||||||
|
<select [(ngModel)]="baseAlias" (change)="getBaseColumns()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
|
<option *ngFor="let alias of tempAliasData | filter : filterAlias" [ngValue]="alias">{{ alias.nameAlias }}</option> |
||||||
|
</select> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div *ngFor="let cols of columnsInfo, index as ind"> |
</div> |
||||||
<app-columns-card [baseColumns]="baseColumns" [specificColumns]="specificColumns" [childIndex]="ind" (selectedColumn)="retrieveColumnsData($event, ind)"></app-columns-card> |
|
||||||
|
<div *ngIf="tablesByBaseSchema" class="mb-2"> |
||||||
|
<input type="checkbox" [(ngModel)]="isChecked" (change)="checkValue(isChecked?'true':'false')" class="w-4 h-4 text-orange-400 bg-slate-400 border-slate-200 rounded focus:ring-orange-400 focus:ring-2"/> |
||||||
|
<label class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Afficher aussi les Vues</label> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div *ngFor="let cols of columnsInfo, index as ind"> |
||||||
|
<app-columns-card [baseColumns]="baseColumns" [specificColumns]="specificColumns" [childIndex]="ind" (selectedColumn)="retrieveColumnsData($event, ind)"></app-columns-card> |
||||||
|
|
||||||
<div class="flex inline-flex space-x-4"> |
<div class="inline-flex space-x-4"> |
||||||
<button (click)="addSelectColumns()" type="button" class="text-white text-lg bg-gradient-to-br from-teal-400 to-green-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 font-medium rounded-full text-sm px-5 py-2.5 text-center mr-2 my-2">+</button> |
<button (click)="addSelectColumns()" type="button" class="text-white text-lg bg-gradient-to-br from-teal-400 to-green-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 font-medium rounded-full px-5 py-2.5 text-center mr-2 my-2">+</button> |
||||||
|
|
||||||
<button *ngIf="columnsInfo.length > 1" (click)="removeSelectColumns(ind)" type="button" class="text-gray-900 text-lg bg-gradient-to-br from-rose-600 to-red-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-red-100 font-medium rounded-full text-sm px-5 py-2.5 text-center my-2">-</button> |
<button *ngIf="columnsInfo.length > 1" (click)="removeSelectColumns(ind)" type="button" class="text-gray-900 text-lg bg-gradient-to-br from-rose-600 to-red-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-red-100 font-medium rounded-full px-5 py-2.5 text-center my-2">-</button> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
@ -1,42 +1,41 @@ |
|||||||
<div class="rounded-lg overflow-hidden shadow-lg bg-slate-100 border-solid border-orange-400 border-2 my-2"> |
<div class="rounded-lg overflow-hidden shadow-lg bg-slate-100 border-solid border-orange-400 border-2 my-2 p-4"> |
||||||
<div class="p-4"> |
<div class="font-bold text-xl text-left mb-2">Selectionner les informations de la Condition :</div> |
||||||
<div class="font-bold text-xl text-left mb-2">Selectionner les informations de la Condition :</div> |
<div class="grid grid-cols-1 md:grid-cols-3 xl:grid-cols-5 gap-4"> |
||||||
<div class="grid grid-cols-1 md:grid-cols-3 xl:grid-cols-5 gap-4"> |
|
||||||
|
<div *ngIf="childIndex != 0"> |
||||||
<div *ngIf="childIndex != 0"> |
<label class="text-black text-left">Opérateurs : </label> |
||||||
<label class="text-black text-left">Opérateurs : </label> |
<select [(ngModel)]="operator" (change)="verifyAndSendConditionData()" size="4" class="my-2 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
<select [(ngModel)]="operator" (change)="verifyAndSendConditionData()" size="4" class="my-2 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
<option *ngFor="let ope of operatorList" [ngValue]="ope">{{ ope }}</option> |
||||||
<option *ngFor="let ope of operatorList" [ngValue]="ope">{{ ope }}</option> |
</select> |
||||||
</select> |
</div> |
||||||
</div> |
|
||||||
|
<div> |
||||||
<div> |
<label class="text-black text-left">Alias : </label> |
||||||
<label class="text-black text-left">Alias : </label> |
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterAlias" placeholder="Rechercher..."> |
||||||
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterAlias" placeholder="Rechercher..."> |
|
||||||
|
<select [(ngModel)]="baseAlias" (change)="getColumns()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
<select [(ngModel)]="baseAlias" (change)="getColumns()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
<option *ngFor="let alias of allAlias | filter : filterAlias" [ngValue]="alias">{{ alias.nameAlias }}</option> |
||||||
<option *ngFor="let alias of allAlias | filter : filterAlias" [ngValue]="alias">{{ alias.nameAlias }}</option> |
</select> |
||||||
</select> |
</div> |
||||||
</div> |
|
||||||
|
<div> |
||||||
<div> |
<label class="text-black text-left">Colonnes : </label> |
||||||
<label class="text-black text-left">Colonnes : </label> |
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterColumn" placeholder="Rechercher..."> |
||||||
<input type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="filterColumn" placeholder="Rechercher..."> |
|
||||||
|
<select [(ngModel)]="baseColumnData" (change)="verifyAndSendConditionData()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
||||||
<select [(ngModel)]="baseColumnData" (change)="verifyAndSendConditionData()" size="3" class="mb-4 bg-gray-50 text-sm text-slate-800 rounded-lg focus:ring-slate-800 focus:border-slate-800 block w-full p-2.5"> |
<option *ngFor="let col of baseColumns | filter : filterColumn" id="{{ col.id }}" [ngValue]="col">{{ col.nameColumn }} ({{col.columnText}})</option> |
||||||
<option *ngFor="let col of baseColumns | filter : filterColumn" id="{{ col.id }}" [ngValue]="col">{{ col.nameColumn }} ({{col.columnText}})</option> |
</select> |
||||||
</select> |
</div> |
||||||
</div> |
|
||||||
|
<div *ngIf="allAlias"> |
||||||
<div *ngIf="allAlias"> |
<label class="text-black text-left">Conditions : </label> |
||||||
<label class="text-black text-left">Conditions : </label> |
<input type="text" (change)="verifyAndSendConditionData()" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="conditionOperator" placeholder="Condition..."> |
||||||
<input type="text" (change)="verifyAndSendConditionData()" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="conditionOperator" placeholder="Condition..."> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div> |
|
||||||
<label class="text-black text-left">Valeurs : </label> |
|
||||||
<input type="text" (change)="verifyAndSendConditionData()" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="conditionValue" placeholder="Valeur..."> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
|
||||||
|
<div> |
||||||
|
<label class="text-black text-left">Valeurs : </label> |
||||||
|
<input type="text" (change)="verifyAndSendConditionData()" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [(ngModel)]="conditionValue" placeholder="Valeur..."> |
||||||
|
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
@ -1,5 +1,5 @@ |
|||||||
import { Pipe, PipeTransform } from '@angular/core'; |
import { Pipe, PipeTransform } from '@angular/core'; |
||||||
import { Script } from './app/model/script'; |
import { Script } from '../model/script'; |
||||||
|
|
||||||
@Pipe({ |
@Pipe({ |
||||||
name: 'filterscript', |
name: 'filterscript', |
@ -1,61 +1,58 @@ |
|||||||
<div class="my-4"> |
|
||||||
<div class="text-center rounded-lg overflow-hidden shadow-lg bg-white p-4 "> |
|
||||||
<div class="text-2xl font-bold">Gestion des Tags</div> |
|
||||||
<div class="grid grid-cols-3 gap-4 mt-2"> |
|
||||||
<button class="text-black bg-gradient-to-r from-teal-200 to-lime-200 hover:bg-gradient-to-l hover:from-teal-200 hover:to-lime-200 focus:ring-4 focus:outline-none focus:ring-lime-200 font-semibold py-2 px-2 rounded shadow mx-2" (click)="addPress = !addPress">Ajouter un Tag</button> |
|
||||||
<input [(ngModel)]="filterTag" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Rechercher..."> |
|
||||||
<button class="text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 font-semibold py-2 px- rounded shadow mx-2" (click)="deleteAllTags()" disabled>Supprimer tous les Tags</button> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div *ngIf="addPress"> |
<div class="text-center rounded-lg overflow-hidden shadow-lg bg-white p-4 my-4"> |
||||||
<div class="bg-orange-400 w-full h-2 overflow-hidden my-4 rounded-lg"></div> |
<div class="text-2xl font-bold">Gestion des Tags</div> |
||||||
<div class="grid grid-cols-2 gap-4"> |
<div class="grid grid-cols-3 gap-4 mt-2"> |
||||||
<div> |
<button class="text-black bg-gradient-to-r from-teal-200 to-lime-200 hover:bg-gradient-to-l hover:from-teal-200 hover:to-lime-200 focus:ring-4 focus:outline-none focus:ring-lime-200 font-semibold py-2 px-2 rounded shadow mx-2" (click)="addPress = !addPress">Ajouter un Tag</button> |
||||||
<div class="text-lg font-semibold">Nom du Tag : </div> |
<input [(ngModel)]="filterTag" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Rechercher..."> |
||||||
<input [(ngModel)]="nameOfTag" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Taper le nom ici..."> |
<button class="text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 font-semibold py-2 px- rounded shadow mx-2" (click)="deleteAllTags()" disabled>Supprimer tous les Tags</button> |
||||||
</div> |
</div> |
||||||
<div> |
|
||||||
<div class="text-lg font-semibold">Description du Tag : </div> |
|
||||||
<input [(ngModel)]="descOfTag" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Taper la description ici..."> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<button class="text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 font-semibold py-2 px-2 rounded shadow mx-2 mt-4" (click)="addTag()">Valider</button> |
|
||||||
</div> |
|
||||||
|
|
||||||
|
<div *ngIf="addPress"> |
||||||
<div class="bg-orange-400 w-full h-2 overflow-hidden my-4 rounded-lg"></div> |
<div class="bg-orange-400 w-full h-2 overflow-hidden my-4 rounded-lg"></div> |
||||||
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4"> |
||||||
<div *ngIf="modifyPress"> |
<div> |
||||||
<div class="grid grid-cols-2 gap-4"> |
<div class="text-lg font-semibold">Nom du Tag : </div> |
||||||
<div> |
<input [(ngModel)]="nameOfTag" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Taper le nom ici..."> |
||||||
<div class="text-lg font-semibold">Nom du Tag : </div> |
</div> |
||||||
<div>{{ previousName }}</div> |
<div> |
||||||
<div class="text-lg font-semibold">Nouveau nom : </div> |
<div class="text-lg font-semibold">Description du Tag : </div> |
||||||
<input [(ngModel)]="modifyName" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Taper le nom ici..."> |
<input [(ngModel)]="descOfTag" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Taper la description ici..."> |
||||||
</div> |
|
||||||
<div> |
|
||||||
<div class="text-lg font-semibold">Description du Tag : </div> |
|
||||||
<div>{{ previousDesc }}</div> |
|
||||||
<div class="text-lg font-semibold">Nouvelle description : </div> |
|
||||||
<input [(ngModel)]="modifyDesc" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Taper la description ici..."> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
<button class="text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 font-semibold py-2 px-2 rounded shadow mx-2 my-4" (click)="modifyTag()">Valider</button> |
|
||||||
</div> |
</div> |
||||||
|
<button class="text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 font-semibold py-2 px-2 rounded shadow mx-2 mt-4" (click)="addTag()">Valider</button> |
||||||
|
</div> |
||||||
|
|
||||||
<div class="grid grid-cols-4 gap-4"> |
<div class="bg-orange-400 w-full h-2 overflow-hidden my-4 rounded-lg"></div> |
||||||
<div *ngFor="let tag of allTags | filter: filterTag" class="rounded-2xl overflow-hidden shadow-lg bg-slate-800 p-2"> |
|
||||||
<div class="text-white font-bold">Nom du Tag : {{ tag.nameTag }}</div> |
|
||||||
<div class="text-white">{{ tag.descriptionTag }}</div> |
|
||||||
<div class="flex justify-between my-2"> |
|
||||||
<button class="text-white bg-gradient-to-br from-purple-600 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-blue-300 font-semibold py-2 px-2 rounded shadow mx-2" (click)="pressModifyBtn(tag.tagId, tag.nameTag, tag.descriptionTag)">Modifier</button> |
|
||||||
<button class="text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 font-semibold py-2 px-2 rounded shadow mx-2" (click)="deleleTag(tag)">Supprimer</button> |
|
||||||
|
|
||||||
</div> |
|
||||||
|
|
||||||
|
<div *ngIf="modifyPress"> |
||||||
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4"> |
||||||
|
<div> |
||||||
|
<div class="text-lg font-semibold">Nom du Tag : </div> |
||||||
|
<div>{{ previousName }}</div> |
||||||
|
<div class="text-lg font-semibold">Nouveau nom : </div> |
||||||
|
<input [(ngModel)]="modifyName" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Taper le nom ici..."> |
||||||
|
</div> |
||||||
|
<div> |
||||||
|
<div class="text-lg font-semibold">Description du Tag : </div> |
||||||
|
<div>{{ previousDesc }}</div> |
||||||
|
<div class="text-lg font-semibold">Nouvelle description : </div> |
||||||
|
<input [(ngModel)]="modifyDesc" type="text" class="block w-full my-2 pl-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" placeholder="Taper la description ici..."> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<button class="text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-green-200 font-semibold py-2 px-2 rounded shadow mx-2 my-4" (click)="modifyTag()">Valider</button> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-4"> |
||||||
|
<div *ngFor="let tag of allTags | filter: filterTag" class="rounded-2xl overflow-hidden shadow-lg bg-slate-800 p-2"> |
||||||
|
<div class="text-white font-bold">Nom du Tag : {{ tag.nameTag }}</div> |
||||||
|
<div class="text-white">{{ tag.descriptionTag }}</div> |
||||||
|
<div class="flex justify-between my-2"> |
||||||
|
<button class="text-white bg-gradient-to-br from-purple-600 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-blue-300 font-semibold py-2 px-2 rounded shadow mx-2" (click)="pressModifyBtn(tag.tagId, tag.nameTag, tag.descriptionTag)">Modifier</button> |
||||||
|
<button class="text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-pink-200 font-semibold py-2 px-2 rounded shadow mx-2" (click)="deleleTag(tag)">Supprimer</button> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in new issue