fix UI
This commit is contained in:
@@ -204,7 +204,8 @@ const itemToDisplay = (item: IUser) => {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.dialog-content {
|
.dialog-content {
|
||||||
width: 60vw;
|
width: 700px !important;
|
||||||
|
max-width: 80vw !important;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
.q-select {
|
.q-select {
|
||||||
min-width: 0 !important;
|
min-width: 0 !important;
|
||||||
|
|||||||
@@ -6,9 +6,10 @@
|
|||||||
<div class="text-h6 ellipsis">{{ item.name }}</div>
|
<div class="text-h6 ellipsis">{{ item.name }}</div>
|
||||||
<div class="text-subtitle2">{{ item.url }}</div>
|
<div class="text-subtitle2">{{ item.url }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isOwnerFunc(item.owner.id)" class="col-auto">
|
<div class="col-auto">
|
||||||
<!-- <q-badge color="secondary" text-color="white" align="middle" class="q-mb-xs" label="他人の所有" /> -->
|
<!-- <q-badge color="secondary" text-color="white" align="middle" class="q-mb-xs" label="他人の所有" /> -->
|
||||||
<q-chip square color="secondary" text-color="white" icon="people" label="他人の所有" size="sm" />
|
<q-chip v-if="!isOwnerFunc(item.owner.id)" square color="secondary" text-color="white" icon="people" label="他人の所有" size="sm" />
|
||||||
|
<q-chip v-else square color="purple" text-color="white" icon="people" label="自分" size="sm" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
<div class="text-grey-7 text-caption text-weight-medium">
|
<div class="text-grey-7 text-caption text-weight-medium">
|
||||||
所有者
|
所有者
|
||||||
</div>
|
</div>
|
||||||
<div class="smaller-font-size">{{ item.owner.fullName }}</div>
|
<div class="smaller-font-size">{{ !isOwnerFunc(item.owner.id) ? item.owner.fullName : '自分' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|||||||
@@ -28,6 +28,14 @@
|
|||||||
</a>
|
</a>
|
||||||
</q-td>
|
</q-td>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:body-cell-version="p">
|
||||||
|
<q-td :props="p">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<span>{{ p.row.version }}</span>
|
||||||
|
<q-badge v-if="isVersionEditing(p.row)" color="orange-7">変更あり</q-badge>
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</template>
|
||||||
<template v-slot:body-cell-actions="p">
|
<template v-slot:body-cell-actions="p">
|
||||||
<q-td :props="p">
|
<q-td :props="p">
|
||||||
<table-action-menu :row="p.row" minWidth="180px" max-width="200px" :actions="actionList" />
|
<table-action-menu :row="p.row" minWidth="180px" max-width="200px" :actions="actionList" />
|
||||||
@@ -112,6 +120,11 @@ const getApps = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isVersionEditing(app:IAppDisplay) {
|
||||||
|
// TODO
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getApps();
|
await getApps();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,9 +29,12 @@
|
|||||||
|
|
||||||
<template v-slot:body-cell-id="p">
|
<template v-slot:body-cell-id="p">
|
||||||
<q-td :props="p">
|
<q-td :props="p">
|
||||||
<div class="flex justify-between">
|
<div class="">
|
||||||
<span>{{ p.row.id }}</span>
|
<span>{{ p.row.id }}</span>
|
||||||
<q-badge v-if="p.row.id === app.version" color="primary">適用中</q-badge>
|
<span class="q-ml-md" v-if="p.row.id === app.version">
|
||||||
|
<q-badge color="primary">適用中</q-badge>
|
||||||
|
<q-badge class="q-ml-xs" v-if="isVersionEditing()" color="orange-7">変更あり</q-badge>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</template>
|
</template>
|
||||||
@@ -54,14 +57,23 @@
|
|||||||
|
|
||||||
<q-dialog v-model="confirmDialog" persistent>
|
<q-dialog v-model="confirmDialog" persistent>
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section class="row items-center">
|
<q-card-section class="q-pb-none">
|
||||||
<q-icon name="warning" color="warning" size="2em" />
|
<q-list>
|
||||||
<span class="q-ml-sm">削除してもよろしいですか?</span>
|
<q-item>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon name="warning" color="warning" size="2em" />
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
<div >現在のバージョンは未保存です。</div>
|
||||||
|
<div >プルすると、上書されますので、よろしいでしょうか?</div>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn flat label="Cancel" color="primary" v-close-popup />
|
<q-btn flat label="キャンセル" color="primary" v-close-popup />
|
||||||
<q-btn flat label="OK" color="primary" :loading="deleteUserLoading" @click="deleteApp" />
|
<q-btn flat label="上書きする" color="primary" :loading="deleteUserLoading" @click="doChangeVersion()" />
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
@@ -132,6 +144,11 @@ const getVersions = async () => {
|
|||||||
versionLoading.value = false;
|
versionLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isVersionEditing() {
|
||||||
|
// TODO
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
let isSuccess = getAppById();
|
let isSuccess = getAppById();
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
@@ -150,25 +167,26 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function changeVersion(version: IAppVersionDisplay) {
|
async function changeVersion(version: IAppVersionDisplay) {
|
||||||
// TODO
|
|
||||||
versionLoading.value = true;
|
|
||||||
target.value = version;
|
target.value = version;
|
||||||
|
if (!isVersionEditing()) {
|
||||||
|
await doChangeVersion(version);
|
||||||
|
} else {
|
||||||
|
confirmDialog.value = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doChangeVersion(version?: IAppVersionDisplay) {
|
||||||
|
if (!version) {
|
||||||
|
version = target.value as IAppVersionDisplay;
|
||||||
|
}
|
||||||
|
confirmDialog.value = false;
|
||||||
|
versionLoading.value = true;
|
||||||
await appStore.changeVersion(app.value, version);
|
await appStore.changeVersion(app.value, version);
|
||||||
await getApps();
|
await getApps();
|
||||||
getAppById();
|
getAppById();
|
||||||
versionLoading.value = false;
|
versionLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// const deleteApp = async () => {
|
|
||||||
// if (target.value?.id) {
|
|
||||||
// deleteUserLoading.value = true;
|
|
||||||
// await appStore.deleteApp(targetRow.value)
|
|
||||||
// await getApps();
|
|
||||||
// deleteUserLoading.value = false;
|
|
||||||
// confirmDialog.value = false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
async function toEditFlowPage() {
|
async function toEditFlowPage() {
|
||||||
store.setApp({
|
store.setApp({
|
||||||
appId: app.value.id,
|
appId: app.value.id,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<q-breadcrumbs-el icon="widgets" label="アプリ管理" to="/app" />
|
<q-breadcrumbs-el icon="widgets" label="アプリ管理" to="/app" />
|
||||||
<q-breadcrumbs-el>
|
<q-breadcrumbs-el>
|
||||||
<template v-slot>
|
<template v-slot>
|
||||||
<a class="full-width" :href="!store.appInfo?'':`${authStore.currentDomain.kintoneUrl}/k/${store.appInfo?.appId}`" target="_blank" title="Kiontoneへ">
|
<a class="full-width" :href="store.appInfo ? `${authStore.currentDomain.kintoneUrl}/k/${store.appInfo?.appId}` : ''" target="_blank" title="Kiontoneへ">
|
||||||
{{ store.appInfo?.name }}
|
{{ store.appInfo?.name }}
|
||||||
<q-icon
|
<q-icon
|
||||||
class="q-ma-xs"
|
class="q-ma-xs"
|
||||||
@@ -99,11 +99,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed, onMounted } from 'vue';
|
import { ref, reactive, computed, onMounted } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { IActionNode, ActionNode, IActionFlow, ActionFlow, RootAction, IActionProperty } from 'src/types/ActionTypes';
|
import { IActionNode, ActionNode, IActionFlow, ActionFlow, RootAction, IActionProperty, AppInfo } from 'src/types/ActionTypes';
|
||||||
import { IAppDisplay, IManagedApp, IVersionSubmit } from 'src/types/AppTypes';
|
import { IAppDisplay, IManagedApp, IVersionSubmit } from 'src/types/AppTypes';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||||
import { useAuthStore } from 'stores/useAuthStore';
|
import { useAuthStore } from 'stores/useAuthStore';
|
||||||
|
import { useAppStore } from 'stores/useAppStore';
|
||||||
import { api } from 'boot/axios';
|
import { api } from 'boot/axios';
|
||||||
|
|
||||||
import NodeItem from 'src/components/main/NodeItem.vue';
|
import NodeItem from 'src/components/main/NodeItem.vue';
|
||||||
@@ -119,10 +120,11 @@ const deployLoading = ref(false);
|
|||||||
const saveLoading = ref(false);
|
const saveLoading = ref(false);
|
||||||
const initLoading = ref(true);
|
const initLoading = ref(true);
|
||||||
const drawerLeft = ref(false);
|
const drawerLeft = ref(false);
|
||||||
const versionSubmit = ref<IVersionSubmit>();
|
const versionSubmit = ref<IVersionSubmit>({} as IVersionSubmit);
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useFlowEditorStore();
|
const store = useFlowEditorStore();
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
|
const appStore = useAppStore();
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const appDg = ref();
|
const appDg = ref();
|
||||||
@@ -262,18 +264,15 @@ const onSaveActionProps=(props:IActionProperty[])=>{
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onSaveVersion = async () => {
|
const onSaveVersion = async () => {
|
||||||
versionSubmit.value = { appId: store.appInfo?.appId }
|
if (!store.appInfo) return;
|
||||||
|
versionSubmit.value = { appId: store.appInfo.appId }
|
||||||
saveVersionAction.value = true;
|
saveVersionAction.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeSaveVersionDg = async (val: 'OK'|'CANCEL') => {
|
const closeSaveVersionDg = async (val: 'OK'|'CANCEL') => {
|
||||||
if (val == 'OK') {
|
if (val == 'OK') {
|
||||||
await onSaveAllFlow();
|
await onSaveAllFlow();
|
||||||
await api.post('api/apps', {
|
await appStore.createVersion(versionSubmit.value);
|
||||||
'appid': versionSubmit.value?.appId,
|
|
||||||
'versionname': versionSubmit.value?.name,
|
|
||||||
'comment': versionSubmit.value?.comment
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -395,9 +394,9 @@ const onClearFilter=()=>{
|
|||||||
filter.value='';
|
filter.value='';
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
authStore.setLeftMenu(false);
|
authStore.setLeftMenu(false);
|
||||||
fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { api } from 'boot/axios';
|
import { api } from 'boot/axios';
|
||||||
import { IAppDisplay, IAppVersion, IAppVersionDisplay, IManagedApp } from 'src/types/AppTypes';
|
import { IAppDisplay, IAppVersion, IAppVersionDisplay, IManagedApp, IVersionSubmit } from 'src/types/AppTypes';
|
||||||
import { IUser } from 'src/types/UserTypes';
|
import { IUser } from 'src/types/UserTypes';
|
||||||
import { date, Notify } from 'quasar'
|
import { date, Notify } from 'quasar'
|
||||||
|
|
||||||
@@ -35,15 +35,6 @@ export const useAppStore = defineStore('app', {
|
|||||||
return this.apps.find((item: IAppDisplay) => item.id === id);
|
return this.apps.find((item: IAppDisplay) => item.id === id);
|
||||||
},
|
},
|
||||||
|
|
||||||
async getVersionsByAppId(app: IAppDisplay) {
|
|
||||||
const { data } = await api.get(`api/appversions/${app.id}`);
|
|
||||||
return data.data.map((item: IAppVersion) => versionToVersionDisplay(item));
|
|
||||||
},
|
|
||||||
|
|
||||||
async changeVersion(app: IAppDisplay, version: IAppVersionDisplay) {
|
|
||||||
await api.put(`api/appversions/${app.id}/${version.id}`);
|
|
||||||
},
|
|
||||||
|
|
||||||
async deleteApp(app: IAppDisplay) {
|
async deleteApp(app: IAppDisplay) {
|
||||||
try {
|
try {
|
||||||
await api.delete(`api/apps/${app.id}`);
|
await api.delete(`api/apps/${app.id}`);
|
||||||
@@ -59,6 +50,23 @@ export const useAppStore = defineStore('app', {
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async getVersionsByAppId(app: IAppDisplay) {
|
||||||
|
const { data } = await api.get(`api/appversions/${app.id}`);
|
||||||
|
return data.data.map((item: IAppVersion) => versionToVersionDisplay(item));
|
||||||
|
},
|
||||||
|
|
||||||
|
async changeVersion(app: IAppDisplay, version: IAppVersionDisplay) {
|
||||||
|
await api.put(`api/appversions/${app.id}/${version.id}`);
|
||||||
|
},
|
||||||
|
|
||||||
|
async createVersion(versionSubmit: IVersionSubmit) {
|
||||||
|
await api.post('api/apps', {
|
||||||
|
'appid': versionSubmit.appId,
|
||||||
|
'versionname': versionSubmit.name,
|
||||||
|
'comment': versionSubmit.comment
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.apps = [];
|
this.apps = [];
|
||||||
this.rowIds.clear();
|
this.rowIds.clear();
|
||||||
|
|||||||
@@ -21,12 +21,6 @@ export interface IAppDisplay{
|
|||||||
version:number;
|
version:number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IVersionInfo {
|
|
||||||
id: string;
|
|
||||||
name?: string;
|
|
||||||
desc?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IVersionSubmit {
|
export interface IVersionSubmit {
|
||||||
appId: string;
|
appId: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user