Merged PR 475: 画面実装

## 概要
[Task2786: 画面実装](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2786)

- ワークフロー一覧画面からワークフローを削除する処理を追加しました。
- アカウント画面の実装について想定外の変更となっていた、部品の不要なクラスを削除しました。
  - クラスに当たっていた`required`はクラスではなくタグの属性だったため削除して属性に設定しています。

## レビューポイント
- 削除処理は適切か。
- アカウント画面の対応内容に問題はないか
  - `select`の`required`は不要だと思いますがいかがでしょうか?

## UIの変更
- [Task2786](https://ndstokyo.sharepoint.com/:f:/r/sites/Piranha/Shared%20Documents/General/OMDS/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88/Task2786?csf=1&web=1&e=0TlIXM)

## 動作確認状況
- ローカルで確認
  - 実際にAPIで削除しての動作は未検証です。
This commit is contained in:
makabe.t 2023-10-11 08:35:51 +00:00
parent 3f018d1100
commit f4293213be
8 changed files with 657 additions and 43 deletions

View File

@ -530,7 +530,7 @@ export interface CreateTypistGroupRequest {
*/
export interface CreateWorkflowsRequest {
/**
* Authornの内部ID
* Authorの内部ID
* @type {number}
* @memberof CreateWorkflowsRequest
*/
@ -643,6 +643,32 @@ export interface ErrorResponse {
*/
'code': string;
}
/**
*
* @export
* @interface GetAccountInfoMinimalAccessRequest
*/
export interface GetAccountInfoMinimalAccessRequest {
/**
* idトークン
* @type {string}
* @memberof GetAccountInfoMinimalAccessRequest
*/
'idToken': string;
}
/**
*
* @export
* @interface GetAccountInfoMinimalAccessResponse
*/
export interface GetAccountInfoMinimalAccessResponse {
/**
*
* @type {number}
* @memberof GetAccountInfoMinimalAccessResponse
*/
'tier': number;
}
/**
*
* @export
@ -1860,6 +1886,31 @@ export interface TypistGroup {
*/
'name': string;
}
/**
*
* @export
* @interface UpdateAcceptedVersionRequest
*/
export interface UpdateAcceptedVersionRequest {
/**
* IDトークン
* @type {string}
* @memberof UpdateAcceptedVersionRequest
*/
'idToken': string;
/**
* EULA
* @type {string}
* @memberof UpdateAcceptedVersionRequest
*/
'acceptedEULAVersion': string;
/**
* DPA
* @type {string}
* @memberof UpdateAcceptedVersionRequest
*/
'acceptedDPAVersion'?: string;
}
/**
*
* @export
@ -1923,6 +1974,37 @@ export interface UpdateTypistGroupRequest {
*/
'typistIds': Array<number>;
}
/**
*
* @export
* @interface UpdateWorkflowRequest
*/
export interface UpdateWorkflowRequest {
/**
* Authorの内部ID
* @type {number}
* @memberof UpdateWorkflowRequest
*/
'authorId': number;
/**
* Worktypeの内部ID
* @type {number}
* @memberof UpdateWorkflowRequest
*/
'worktypeId'?: number;
/**
* ID
* @type {number}
* @memberof UpdateWorkflowRequest
*/
'templateId'?: number;
/**
* /
* @type {Array<WorkflowTypist>}
* @memberof UpdateWorkflowRequest
*/
'typists': Array<WorkflowTypist>;
}
/**
*
* @export
@ -2408,9 +2490,9 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAccount: async (deleteAccountRequest: DeleteAccountRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
deleteAccountAndData: async (deleteAccountRequest: DeleteAccountRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'deleteAccountRequest' is not null or undefined
assertParamExists('deleteAccount', 'deleteAccountRequest', deleteAccountRequest)
assertParamExists('deleteAccountAndData', 'deleteAccountRequest', deleteAccountRequest)
const localVarPath = `/accounts/delete`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@ -2441,6 +2523,42 @@ export const AccountsApiAxiosParamCreator = function (configuration?: Configurat
options: localVarRequestOptions,
};
},
/**
*
* @summary
* @param {GetAccountInfoMinimalAccessRequest} getAccountInfoMinimalAccessRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAccountInfoMinimalAccess: async (getAccountInfoMinimalAccessRequest: GetAccountInfoMinimalAccessRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'getAccountInfoMinimalAccessRequest' is not null or undefined
assertParamExists('getAccountInfoMinimalAccess', 'getAccountInfoMinimalAccessRequest', getAccountInfoMinimalAccessRequest)
const localVarPath = `/accounts/minimal-access`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(getAccountInfoMinimalAccessRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Author一覧を取得します
* @summary
@ -3180,8 +3298,19 @@ export const AccountsApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteAccount(deleteAccountRequest: DeleteAccountRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccount(deleteAccountRequest, options);
async deleteAccountAndData(deleteAccountRequest: DeleteAccountRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccountAndData(deleteAccountRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary
* @param {GetAccountInfoMinimalAccessRequest} getAccountInfoMinimalAccessRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest: GetAccountInfoMinimalAccessRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountInfoMinimalAccessResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
@ -3446,8 +3575,18 @@ export const AccountsApiFactory = function (configuration?: Configuration, baseP
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteAccount(deleteAccountRequest: DeleteAccountRequest, options?: any): AxiosPromise<object> {
return localVarFp.deleteAccount(deleteAccountRequest, options).then((request) => request(axios, basePath));
deleteAccountAndData(deleteAccountRequest: DeleteAccountRequest, options?: any): AxiosPromise<object> {
return localVarFp.deleteAccountAndData(deleteAccountRequest, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
* @param {GetAccountInfoMinimalAccessRequest} getAccountInfoMinimalAccessRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest: GetAccountInfoMinimalAccessRequest, options?: any): AxiosPromise<GetAccountInfoMinimalAccessResponse> {
return localVarFp.getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest, options).then((request) => request(axios, basePath));
},
/**
* Author一覧を取得します
@ -3707,8 +3846,20 @@ export class AccountsApi extends BaseAPI {
* @throws {RequiredError}
* @memberof AccountsApi
*/
public deleteAccount(deleteAccountRequest: DeleteAccountRequest, options?: AxiosRequestConfig) {
return AccountsApiFp(this.configuration).deleteAccount(deleteAccountRequest, options).then((request) => request(this.axios, this.basePath));
public deleteAccountAndData(deleteAccountRequest: DeleteAccountRequest, options?: AxiosRequestConfig) {
return AccountsApiFp(this.configuration).deleteAccountAndData(deleteAccountRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
* @param {GetAccountInfoMinimalAccessRequest} getAccountInfoMinimalAccessRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AccountsApi
*/
public getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest: GetAccountInfoMinimalAccessRequest, options?: AxiosRequestConfig) {
return AccountsApiFp(this.configuration).getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
@ -5981,6 +6132,105 @@ export class TemplatesApi extends BaseAPI {
/**
* TermsApi - axios parameter creator
* @export
*/
export const TermsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTermsInfo: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/terms`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* TermsApi - functional programming interface
* @export
*/
export const TermsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = TermsApiAxiosParamCreator(configuration)
return {
/**
*
* @summary
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getTermsInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getTermsInfo(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* TermsApi - factory interface
* @export
*/
export const TermsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = TermsApiFp(configuration)
return {
/**
*
* @summary
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTermsInfo(options?: any): AxiosPromise<object> {
return localVarFp.getTermsInfo(options).then((request) => request(axios, basePath));
},
};
};
/**
* TermsApi - object-oriented interface
* @export
* @class TermsApi
* @extends {BaseAPI}
*/
export class TermsApi extends BaseAPI {
/**
*
* @summary
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof TermsApi
*/
public getTermsInfo(options?: AxiosRequestConfig) {
return TermsApiFp(this.configuration).getTermsInfo(options).then((request) => request(this.axios, this.basePath));
}
}
/**
* UsersApi - axios parameter creator
* @export
@ -6281,6 +6531,42 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
options: localVarRequestOptions,
};
},
/**
*
* @summary
* @param {UpdateAcceptedVersionRequest} updateAcceptedVersionRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAcceptedVersion: async (updateAcceptedVersionRequest: UpdateAcceptedVersionRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'updateAcceptedVersionRequest' is not null or undefined
assertParamExists('updateAcceptedVersion', 'updateAcceptedVersionRequest', updateAcceptedVersionRequest)
const localVarPath = `/users/accepted-version`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(updateAcceptedVersionRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary
@ -6456,6 +6742,17 @@ export const UsersApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.signup(signupRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary
* @param {UpdateAcceptedVersionRequest} updateAcceptedVersionRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateAcceptedVersion(updateAcceptedVersionRequest: UpdateAcceptedVersionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateAcceptedVersion(updateAcceptedVersionRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary
@ -6565,6 +6862,16 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
signup(signupRequest: SignupRequest, options?: any): AxiosPromise<object> {
return localVarFp.signup(signupRequest, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
* @param {UpdateAcceptedVersionRequest} updateAcceptedVersionRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAcceptedVersion(updateAcceptedVersionRequest: UpdateAcceptedVersionRequest, options?: any): AxiosPromise<object> {
return localVarFp.updateAcceptedVersion(updateAcceptedVersionRequest, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
@ -6688,6 +6995,18 @@ export class UsersApi extends BaseAPI {
return UsersApiFp(this.configuration).signup(signupRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
* @param {UpdateAcceptedVersionRequest} updateAcceptedVersionRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UsersApi
*/
public updateAcceptedVersion(updateAcceptedVersionRequest: UpdateAcceptedVersionRequest, options?: AxiosRequestConfig) {
return UsersApiFp(this.configuration).updateAcceptedVersion(updateAcceptedVersionRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
@ -6761,6 +7080,44 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura
options: localVarRequestOptions,
};
},
/**
*
* @summary
* @param {number} workflowId ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteWorkflow: async (workflowId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'workflowId' is not null or undefined
assertParamExists('deleteWorkflow', 'workflowId', workflowId)
const localVarPath = `/workflows/{workflowId}/delete`
.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary
@ -6790,6 +7147,50 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary
* @param {number} workflowId ID
* @param {UpdateWorkflowRequest} updateWorkflowRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateWorkflow: async (workflowId: number, updateWorkflowRequest: UpdateWorkflowRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'workflowId' is not null or undefined
assertParamExists('updateWorkflow', 'workflowId', workflowId)
// verify required parameter 'updateWorkflowRequest' is not null or undefined
assertParamExists('updateWorkflow', 'updateWorkflowRequest', updateWorkflowRequest)
const localVarPath = `/workflows/{workflowId}`
.replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(updateWorkflowRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
@ -6816,6 +7217,17 @@ export const WorkflowsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkflows(createWorkflowsRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary
* @param {number} workflowId ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteWorkflow(workflowId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWorkflow(workflowId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary
@ -6826,6 +7238,18 @@ export const WorkflowsApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflows(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary
* @param {number} workflowId ID
* @param {UpdateWorkflowRequest} updateWorkflowRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateWorkflow(workflowId: number, updateWorkflowRequest: UpdateWorkflowRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateWorkflow(workflowId, updateWorkflowRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
@ -6846,6 +7270,16 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base
createWorkflows(createWorkflowsRequest: CreateWorkflowsRequest, options?: any): AxiosPromise<object> {
return localVarFp.createWorkflows(createWorkflowsRequest, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
* @param {number} workflowId ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteWorkflow(workflowId: number, options?: any): AxiosPromise<object> {
return localVarFp.deleteWorkflow(workflowId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
@ -6855,6 +7289,17 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base
getWorkflows(options?: any): AxiosPromise<GetWorkflowsResponse> {
return localVarFp.getWorkflows(options).then((request) => request(axios, basePath));
},
/**
*
* @summary
* @param {number} workflowId ID
* @param {UpdateWorkflowRequest} updateWorkflowRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateWorkflow(workflowId: number, updateWorkflowRequest: UpdateWorkflowRequest, options?: any): AxiosPromise<object> {
return localVarFp.updateWorkflow(workflowId, updateWorkflowRequest, options).then((request) => request(axios, basePath));
},
};
};
@ -6877,6 +7322,18 @@ export class WorkflowsApi extends BaseAPI {
return WorkflowsApiFp(this.configuration).createWorkflows(createWorkflowsRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
* @param {number} workflowId ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof WorkflowsApi
*/
public deleteWorkflow(workflowId: number, options?: AxiosRequestConfig) {
return WorkflowsApiFp(this.configuration).deleteWorkflow(workflowId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
@ -6887,6 +7344,19 @@ export class WorkflowsApi extends BaseAPI {
public getWorkflows(options?: AxiosRequestConfig) {
return WorkflowsApiFp(this.configuration).getWorkflows(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary
* @param {number} workflowId ID
* @param {UpdateWorkflowRequest} updateWorkflowRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof WorkflowsApi
*/
public updateWorkflow(workflowId: number, updateWorkflowRequest: UpdateWorkflowRequest, options?: AxiosRequestConfig) {
return WorkflowsApiFp(this.configuration).updateWorkflow(workflowId, updateWorkflowRequest, options).then((request) => request(this.axios, this.basePath));
}
}

View File

@ -130,7 +130,7 @@ export const deleteAccountAsync = createAsyncThunk<
const accountApi = new AccountsApi(config);
try {
await accountApi.deleteAccount(deleteAccounRequest, {
await accountApi.deleteAccountAndData(deleteAccounRequest, {
headers: { authorization: `Bearer ${accessToken}` },
});

View File

@ -16,7 +16,6 @@ import type { RootState } from "app/store";
import { ErrorObject, createErrorObject } from "common/errors";
import { openSnackbar } from "features/ui/uiSlice";
import { getTranslationID } from "translation";
import { WorkflowRelations } from "./state";
export const listWorkflowAsync = createAsyncThunk<
GetWorkflowsResponse,
@ -211,3 +210,49 @@ export const getworkflowRelationsAsync = createAsyncThunk<
return thunkApi.rejectWithValue({ error });
}
});
export const deleteWorkflowAsync = createAsyncThunk<
{
/* Empty Object */
},
{ workflowId: number },
{
// rejectした時の返却値の型
rejectValue: {
error: ErrorObject;
};
}
>("workflow/deleteWorkflowAsync", async (args, thunkApi) => {
const { workflowId } = args;
// apiのConfigurationを取得する
const { getState } = thunkApi;
const state = getState() as RootState;
const { configuration, accessToken } = state.auth;
const config = new Configuration(configuration);
const workflowsApi = new WorkflowsApi(config);
try {
await workflowsApi.deleteWorkflow(workflowId, {
headers: { authorization: `Bearer ${accessToken}` },
});
thunkApi.dispatch(
openSnackbar({
level: "info",
message: getTranslationID("common.message.success"),
})
);
return {};
} catch (e) {
// e ⇒ errorObjectに変換"
const error = createErrorObject(e);
thunkApi.dispatch(
openSnackbar({
level: "error",
message: getTranslationID("common.message.internalServerError"),
})
);
return thunkApi.rejectWithValue({ error });
}
});

View File

@ -3,6 +3,7 @@ import { Assignee } from "api";
import {
createWorkflowAsync,
getworkflowRelationsAsync,
deleteWorkflowAsync,
listWorkflowAsync,
} from "./operations";
import { WorkflowState } from "./state";
@ -127,6 +128,15 @@ export const workflowSlice = createSlice({
builder.addCase(createWorkflowAsync.rejected, (state) => {
state.apps.isAddLoading = false;
});
builder.addCase(deleteWorkflowAsync.pending, (state) => {
state.apps.isLoading = true;
});
builder.addCase(deleteWorkflowAsync.fulfilled, (state) => {
state.apps.isLoading = false;
});
builder.addCase(deleteWorkflowAsync.rejected, (state) => {
state.apps.isLoading = false;
});
},
});

View File

@ -149,7 +149,8 @@ const AccountPage: React.FC = (): JSX.Element => {
{isTier5 && !viewInfo.account.parentAccountName && (
<dd className={styles.form}>
<select
className={`${styles.formInput} ${styles.required}`}
className={styles.formInput}
required
onChange={(event) => {
dispatch(
changeDealer({
@ -238,8 +239,8 @@ const AccountPage: React.FC = (): JSX.Element => {
</dt>
<dd className={styles.form}>
<select
name=""
className={`${styles.formInput} ${styles.required}`}
className={styles.formInput}
required
onChange={(event) => {
dispatch(
changePrimaryAdministrator({
@ -303,8 +304,8 @@ const AccountPage: React.FC = (): JSX.Element => {
</dt>
<dd className={styles.form}>
<select
name=""
className={`${styles.formInput} ${styles.required}`}
className={styles.formInput}
required
onChange={(event) => {
dispatch(
changeSecondryAdministrator({

View File

@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import React, { useCallback, useEffect, useState } from "react";
import Header from "components/header";
import Footer from "components/footer";
import styles from "styles/app.module.scss";
@ -10,7 +10,10 @@ import groupSettingImg from "assets/images/group_setting.svg";
import { AppDispatch } from "app/store";
import { useTranslation } from "react-i18next";
import { useDispatch, useSelector } from "react-redux";
import { listWorkflowAsync } from "features/workflow/operations";
import {
deleteWorkflowAsync,
listWorkflowAsync,
} from "features/workflow/operations";
import { selectIsLoading, selectWorkflows } from "features/workflow";
import progress_activit from "assets/images/progress_activit.svg";
import { getTranslationID } from "translation";
@ -27,6 +30,24 @@ const WorkflowPage: React.FC = (): JSX.Element => {
useEffect(() => {
dispatch(listWorkflowAsync());
}, [dispatch]);
// ワークフロー削除
const onDeleteWorkflow = useCallback(
async (workflowId: number) => {
if (
/* eslint-disable-next-line no-alert */
!window.confirm(t(getTranslationID("common.message.dialogConfirm")))
) {
return;
}
const { meta } = await dispatch(deleteWorkflowAsync({ workflowId }));
if (meta.requestStatus === "fulfilled") {
dispatch(listWorkflowAsync());
}
},
[dispatch, t]
);
return (
<>
{isShowAddPopup && (
@ -143,7 +164,12 @@ const WorkflowPage: React.FC = (): JSX.Element => {
</a>
</li>
<li>
<a href="">
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
<a
onClick={() => {
onDeleteWorkflow(workflow.id);
}}
>
{t(getTranslationID("common.label.delete"))}
</a>
</li>

View File

@ -293,6 +293,31 @@ h5 {
width: 1.4rem;
vertical-align: top;
}
.accountSignout {
display: inline-block;
margin-left: 1rem;
color: #999999;
font-size: 0.8rem;
cursor: pointer;
-moz-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.accountSignout .accountIcon {
opacity: 0.5;
margin-right: 0.2rem;
-moz-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.accountSignout:hover {
color: #333333;
}
.accountSignout:hover .accountIcon {
opacity: 1;
}
_:-ms-lang(x)::-ms-backdrop,
.header {
@ -647,6 +672,7 @@ h3 + .brCrumb .tlIcon {
padding: 0.6rem 0;
margin-right: 1rem;
cursor: pointer;
white-space: pre-line;
}
.form label:has(input:disabled) {
cursor: default;
@ -870,6 +896,24 @@ h3 + .brCrumb .tlIcon {
text-align: right;
word-break: break-all;
}
.listDocument {
margin-bottom: 3rem;
}
.listDocument li {
padding: 0 0 0 1.5rem;
margin-bottom: 1rem;
position: relative;
}
.listDocument li::before {
content: "";
width: 0.5rem;
height: 0.5rem;
background: #333333;
border-radius: 50%;
position: absolute;
top: 0.2rem;
left: 0;
}
.boxFlex {
display: flex;
@ -1428,7 +1472,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license > div,
.dictation > div,
.partners > div,
.workflow > div {
.workflow > div,
.support > div {
padding: 0 2rem;
position: relative;
}
@ -1437,7 +1482,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license > div .icLoading,
.dictation > div .icLoading,
.partners > div .icLoading,
.workflow > div .icLoading {
.workflow > div .icLoading,
.support > div .icLoading {
top: 5.5rem;
left: calc(50% - 25px);
}
@ -1446,7 +1492,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table tr.tableHeader th.clm0,
.dictation .table tr.tableHeader th.clm0,
.partners .table tr.tableHeader th.clm0,
.workflow .table tr.tableHeader th.clm0 {
.workflow .table tr.tableHeader th.clm0,
.support .table tr.tableHeader th.clm0 {
width: 0px;
padding: 0 0;
}
@ -1455,7 +1502,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table tr:not(.tableHeader),
.dictation .table tr:not(.tableHeader),
.partners .table tr:not(.tableHeader),
.workflow .table tr:not(.tableHeader) {
.workflow .table tr:not(.tableHeader),
.support .table tr:not(.tableHeader) {
position: relative;
}
.account .table tr:not(.tableHeader):hover .menuInTable,
@ -1463,7 +1511,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table tr:not(.tableHeader):hover .menuInTable,
.dictation .table tr:not(.tableHeader):hover .menuInTable,
.partners .table tr:not(.tableHeader):hover .menuInTable,
.workflow .table tr:not(.tableHeader):hover .menuInTable {
.workflow .table tr:not(.tableHeader):hover .menuInTable,
.support .table tr:not(.tableHeader):hover .menuInTable {
opacity: 1;
}
.account .table tr:not(.tableHeader).isSelected,
@ -1471,7 +1520,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table tr:not(.tableHeader).isSelected,
.dictation .table tr:not(.tableHeader).isSelected,
.partners .table tr:not(.tableHeader).isSelected,
.workflow .table tr:not(.tableHeader).isSelected {
.workflow .table tr:not(.tableHeader).isSelected,
.support .table tr:not(.tableHeader).isSelected {
background: #0084b2;
color: #ffffff;
}
@ -1480,7 +1530,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table tr:not(.tableHeader).isSelected:hover,
.dictation .table tr:not(.tableHeader).isSelected:hover,
.partners .table tr:not(.tableHeader).isSelected:hover,
.workflow .table tr:not(.tableHeader).isSelected:hover {
.workflow .table tr:not(.tableHeader).isSelected:hover,
.support .table tr:not(.tableHeader).isSelected:hover {
color: #ffffff;
}
.account .table tr:not(.tableHeader).isSelected .menuInTable,
@ -1488,7 +1539,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table tr:not(.tableHeader).isSelected .menuInTable,
.dictation .table tr:not(.tableHeader).isSelected .menuInTable,
.partners .table tr:not(.tableHeader).isSelected .menuInTable,
.workflow .table tr:not(.tableHeader).isSelected .menuInTable {
.workflow .table tr:not(.tableHeader).isSelected .menuInTable,
.support .table tr:not(.tableHeader).isSelected .menuInTable {
display: block;
}
.account .table td,
@ -1496,7 +1548,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table td,
.dictation .table td,
.partners .table td,
.workflow .table td {
.workflow .table td,
.support .table td {
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
@ -1508,7 +1561,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table td.clm0,
.dictation .table td.clm0,
.partners .table td.clm0,
.workflow .table td.clm0 {
.workflow .table td.clm0,
.support .table td.clm0 {
width: 0px;
padding: 0 0;
overflow: visible;
@ -1521,7 +1575,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table.user,
.dictation .table.user,
.partners .table.user,
.workflow .table.user {
.workflow .table.user,
.support .table.user {
margin-bottom: 5rem;
}
.account .table.user th::after,
@ -1529,7 +1584,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table.user th::after,
.dictation .table.user th::after,
.partners .table.user th::after,
.workflow .table.user th::after {
.workflow .table.user th::after,
.support .table.user th::after {
display: none;
}
.account .table.user tr:not(.tableHeader) td,
@ -1537,7 +1593,8 @@ _:-ms-lang(x)::-ms-backdrop,
.license .table.user tr:not(.tableHeader) td,
.dictation .table.user tr:not(.tableHeader) td,
.partners .table.user tr:not(.tableHeader) td,
.workflow .table.user tr:not(.tableHeader) td {
.workflow .table.user tr:not(.tableHeader) td,
.support .table.user tr:not(.tableHeader) td {
padding-bottom: 2rem;
vertical-align: top;
}
@ -2209,7 +2266,8 @@ tr.isSelected .menuInTable li a.isDisable {
}
.formChange ul.chooseMember li input + label:hover,
.formChange ul.holdMember li input + label:hover {
background: #e6e6e6 url(../assets/images/arrow_circle_left.svg) no-repeat left center;
background: #e6e6e6 url(../assets/images/arrow_circle_left.svg) no-repeat left
center;
background-size: 1.3rem;
}
.formChange ul.chooseMember li input:checked + label,
@ -2220,8 +2278,8 @@ tr.isSelected .menuInTable li a.isDisable {
}
.formChange ul.chooseMember li input:checked + label:hover,
.formChange ul.holdMember li input:checked + label:hover {
background: #e6e6e6 url(../assets/images/arrow_circle_right.svg) no-repeat right
center;
background: #e6e6e6 url(../assets/images/arrow_circle_right.svg) no-repeat
right center;
background-size: 1.3rem;
}
.formChange > p {
@ -2374,7 +2432,8 @@ tr.isSelected .menuInTable li a.isDisable {
}
.formChange ul.chooseMember li input + label:hover,
.formChange ul.holdMember li input + label:hover {
background: #e6e6e6 url(../assets/images/arrow_circle_left.svg) no-repeat left center;
background: #e6e6e6 url(../assets/images/arrow_circle_left.svg) no-repeat left
center;
background-size: 1.3rem;
}
.formChange ul.chooseMember li input:checked + label,
@ -2385,8 +2444,8 @@ tr.isSelected .menuInTable li a.isDisable {
}
.formChange ul.chooseMember li input:checked + label:hover,
.formChange ul.holdMember li input:checked + label:hover {
background: #e6e6e6 url(../assets/images/arrow_circle_right.svg) no-repeat right
center;
background: #e6e6e6 url(../assets/images/arrow_circle_right.svg) no-repeat
right center;
background-size: 1.3rem;
}
.formChange > p {
@ -2500,6 +2559,9 @@ tr.isSelected .menuInTable li a.isDisable {
padding: 0 3rem;
}
.txContents {
padding: 3rem;
}
.txNormal {
font-size: 16px;
line-height: 1.7;

View File

@ -7,6 +7,7 @@ declare const classNames: {
readonly isActive: "isActive";
readonly accountInfo: "accountInfo";
readonly accountIcon: "accountIcon";
readonly accountSignout: "accountSignout";
readonly main: "main";
readonly mainSmall: "mainSmall";
readonly mainLogin: "mainLogin";
@ -45,10 +46,10 @@ declare const classNames: {
readonly formBack: "formBack";
readonly formButtonTx: "formButtonTx";
readonly formDone: "formDone";
readonly formDelete: "formDelete";
readonly formTrash: "formTrash";
readonly listVertical: "listVertical";
readonly listHeader: "listHeader";
readonly listDocument: "listDocument";
readonly boxFlex: "boxFlex";
readonly aru: "aru";
readonly btw: "btw";
@ -101,11 +102,11 @@ declare const classNames: {
readonly dictation: "dictation";
readonly partners: "partners";
readonly workflow: "workflow";
readonly support: "support";
readonly clm0: "clm0";
readonly menuInTable: "menuInTable";
readonly isSelected: "isSelected";
readonly formCheckToggle: "formCheckToggle";
readonly toggleBase: "toggleBase";
readonly alignRight: "alignRight";
readonly menuAction: "menuAction";
readonly inTable: "inTable";
readonly menuLink: "menuLink";
@ -197,7 +198,6 @@ declare const classNames: {
readonly worktype: "worktype";
readonly selectMenu: "selectMenu";
readonly alignLeft: "alignLeft";
readonly alignRight: "alignRight";
readonly floatNone: "floatNone";
readonly floatLeft: "floatLeft";
readonly floatRight: "floatRight";
@ -217,8 +217,8 @@ declare const classNames: {
readonly paddSide1: "paddSide1";
readonly paddSide2: "paddSide2";
readonly paddSide3: "paddSide3";
readonly txContents: "txContents";
readonly txIcon: "txIcon";
readonly txWswrap: "txWswrap";
readonly required: "required";
};
export = classNames;