1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

refactor: ts and composition api on WorkspaceExplorebar* components

This commit is contained in:
2022-06-09 20:08:32 +02:00
parent be70b5be7f
commit bd46d17424
16 changed files with 853 additions and 910 deletions

View File

@@ -11,12 +11,14 @@ import { useConnectionsStore } from '@/stores/connections';
import { useNotificationsStore } from '@/stores/notifications';
import { useSettingsStore } from '@/stores/settings';
import {
ClientCode,
CollationInfos,
ConnectionParams,
EventInfos,
FunctionInfos,
RoutineInfos,
TableInfos,
TriggerFunctionInfos,
TriggerInfos,
TypesGroup
} from 'common/interfaces/antares';
@@ -44,12 +46,13 @@ export interface WorkspaceStructure {
schedulers: EventInfos[];
tables: TableInfos[];
triggers: TriggerInfos[];
triggerFunctions: TriggerFunctionInfos[];
size: number;
}
export interface Breadcrumb {
function?: string;
procedure?: string;
routine?: string;
query?: string;
scheduler?: string;
schema?: string;
@@ -61,7 +64,7 @@ export interface Breadcrumb {
export interface Workspace {
uid: string;
client?: string;
client?: ClientCode;
connectionStatus: string;
selectedTab: string | number;
searchTerm: string;
@@ -133,7 +136,7 @@ export const useWorkspacesStore = defineStore('workspaces', {
else
this.selectedWorkspace = uid;
},
async connectWorkspace (connection: ConnectionParams & { pgConnString: string }) {
async connectWorkspace (connection: ConnectionParams & { pgConnString?: string }) {
this.workspaces = (this.workspaces as Workspace[]).map(workspace => workspace.uid === connection.uid
? {
...workspace,
@@ -405,7 +408,7 @@ export const useWorkspacesStore = defineStore('workspaces', {
table: null,
trigger: null,
triggerFunction: null,
procedure: null,
routine: null,
function: null,
scheduler: null,
view: null,