Merge branch 'develop' into ccb
# Conflicts: # dictation_client/src/pages/UserListPage/index.tsx # dictation_server/package.json # dictation_server/src/common/test/init.ts # dictation_server/src/features/auth/auth.service.spec.ts # dictation_server/src/features/files/files.service.spec.ts # dictation_server/src/features/licenses/licenses.service.spec.ts # dictation_server/src/features/tasks/tasks.service.spec.ts # dictation_server/src/features/terms/terms.service.spec.ts # dictation_server/src/features/users/users.service.spec.ts # dictation_server/src/features/workflows/workflows.service.spec.ts
This commit is contained in:
commit
ded446de93
@ -51,8 +51,6 @@ export const HEADER_MENUS: {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const HEADER_NAME = "ODMS Cloud";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* adminのみに表示するヘッダータブ
|
* adminのみに表示するヘッダータブ
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import { getFilteredMenus } from "./utils";
|
|||||||
import logo from "../../assets/images/OMS_logo_black.svg";
|
import logo from "../../assets/images/OMS_logo_black.svg";
|
||||||
import ac from "../../assets/images/account_circle.svg";
|
import ac from "../../assets/images/account_circle.svg";
|
||||||
import { LoginedPaths } from "./types";
|
import { LoginedPaths } from "./types";
|
||||||
import { HEADER_NAME } from "./constants";
|
|
||||||
import logout from "../../assets/images/logout.svg";
|
import logout from "../../assets/images/logout.svg";
|
||||||
import { getTranslationID } from "../../translation";
|
import { getTranslationID } from "../../translation";
|
||||||
|
|
||||||
@ -74,7 +73,6 @@ const LoginedHeader: React.FC<HeaderProps> = (props: HeaderProps) => {
|
|||||||
<div className={styles.headerLogo}>
|
<div className={styles.headerLogo}>
|
||||||
<img src={logo} alt="OM System" />
|
<img src={logo} alt="OM System" />
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.headerSub}>{HEADER_NAME}</div>
|
|
||||||
<div className={styles.headerMenu}>
|
<div className={styles.headerMenu}>
|
||||||
<ul>
|
<ul>
|
||||||
{filterMenus.map((x) => (
|
{filterMenus.map((x) => (
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import styles from "styles/app.module.scss";
|
import styles from "styles/app.module.scss";
|
||||||
import logo from "../../assets/images/OMS_logo_black.svg";
|
import logo from "../../assets/images/OMS_logo_black.svg";
|
||||||
import { HEADER_NAME } from "./constants";
|
|
||||||
|
|
||||||
interface NotLoginHeaderProps {
|
interface NotLoginHeaderProps {
|
||||||
isMobile?: boolean;
|
isMobile?: boolean;
|
||||||
@ -16,7 +15,6 @@ const NotLoginHeader: React.FC<NotLoginHeaderProps> = (
|
|||||||
<div className={`${styles.headerLogo}`}>
|
<div className={`${styles.headerLogo}`}>
|
||||||
<img src={logo} alt="OM System" />
|
<img src={logo} alt="OM System" />
|
||||||
</div>
|
</div>
|
||||||
<p className={`${styles.headerSub}`}>{HEADER_NAME}</p>
|
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,3 +11,9 @@ export const LICENSE_ALLOCATE_STATUS = {
|
|||||||
ALLOCATED: "Allocated",
|
ALLOCATED: "Allocated",
|
||||||
NOTALLOCATED: "Not Allocated",
|
NOTALLOCATED: "Not Allocated",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
// NoLicenseの表示
|
||||||
|
export const NO_LICENSE = "No License" as const;
|
||||||
|
|
||||||
|
// ライセンスが割り当てられている場合の表示
|
||||||
|
export const LICENSE_NORMAL = "License Assigned" as const;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { USER_ROLES } from "components/auth/constants";
|
|||||||
import { convertLocalToUTCDate } from "common/convertLocalToUTCDate";
|
import { convertLocalToUTCDate } from "common/convertLocalToUTCDate";
|
||||||
import {
|
import {
|
||||||
AddUser,
|
AddUser,
|
||||||
|
LicenseStatusType,
|
||||||
RoleType,
|
RoleType,
|
||||||
UserView,
|
UserView,
|
||||||
isLicenseStatusType,
|
isLicenseStatusType,
|
||||||
@ -163,6 +164,12 @@ export const selectUserViews = (state: RootState): UserView[] => {
|
|||||||
prompt,
|
prompt,
|
||||||
typistGroupName
|
typistGroupName
|
||||||
);
|
);
|
||||||
|
// licenseStatus,remaining,expirationの値を変換する
|
||||||
|
const {
|
||||||
|
licenseStatus: convertedLicenseStatus,
|
||||||
|
expiration: convertedExpiration,
|
||||||
|
remaining: convertedRemaining,
|
||||||
|
} = convertValueBasedOnLicenseStatus(licenseStatus, expiration, remaining);
|
||||||
// restのid以外をUserViewに追加する
|
// restのid以外をUserViewに追加する
|
||||||
return {
|
return {
|
||||||
typistGroupName: convertedValues.typistGroupName,
|
typistGroupName: convertedValues.typistGroupName,
|
||||||
@ -171,10 +178,9 @@ export const selectUserViews = (state: RootState): UserView[] => {
|
|||||||
authorId: convertedValues.authorId,
|
authorId: convertedValues.authorId,
|
||||||
// roleの一文字目を大文字に変換する
|
// roleの一文字目を大文字に変換する
|
||||||
role: role.charAt(0).toUpperCase() + role.slice(1),
|
role: role.charAt(0).toUpperCase() + role.slice(1),
|
||||||
licenseStatus:
|
licenseStatus: convertedLicenseStatus,
|
||||||
licenseStatus === LICENSE_STATUS.NORMAL ? "-" : licenseStatus,
|
expiration: convertedExpiration,
|
||||||
expiration: expiration ?? "-",
|
remaining: convertedRemaining,
|
||||||
remaining: remaining ?? "-",
|
|
||||||
...rest,
|
...rest,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -254,7 +260,7 @@ export const selectLicenseAllocateUserExpirationDate = (state: RootState) => {
|
|||||||
return "-";
|
return "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${expiration}(${remaining})`;
|
return `${expiration ?? "-"}(${remaining ?? "-"})`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const selectSelectedlicenseId = (state: RootState) =>
|
export const selectSelectedlicenseId = (state: RootState) =>
|
||||||
@ -328,3 +334,47 @@ const calculateExpiryDate = (expiryDate: string) => {
|
|||||||
|
|
||||||
return `${formattedExpirationDate} (${daysDifference})`;
|
return `${formattedExpirationDate} (${daysDifference})`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// licenseStatus,remainingに応じて値を変換する
|
||||||
|
const convertValueBasedOnLicenseStatus = (
|
||||||
|
licenseStatus: LicenseStatusType,
|
||||||
|
expiration?: string,
|
||||||
|
remaining?: number
|
||||||
|
): {
|
||||||
|
licenseStatus: LicenseStatusType;
|
||||||
|
expiration?: string;
|
||||||
|
remaining?: number;
|
||||||
|
} => {
|
||||||
|
if (licenseStatus === LICENSE_STATUS.NOLICENSE) {
|
||||||
|
return {
|
||||||
|
licenseStatus,
|
||||||
|
expiration: undefined,
|
||||||
|
remaining: undefined,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// remainingが存在し、かつ負の値である場合は、NoLicenseとする
|
||||||
|
if (remaining && remaining < 0) {
|
||||||
|
return {
|
||||||
|
licenseStatus: LICENSE_STATUS.NOLICENSE,
|
||||||
|
expiration: undefined,
|
||||||
|
remaining: undefined,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
licenseStatus === LICENSE_STATUS.RENEW ||
|
||||||
|
licenseStatus === LICENSE_STATUS.NORMAL ||
|
||||||
|
licenseStatus === LICENSE_STATUS.ALERT
|
||||||
|
) {
|
||||||
|
return {
|
||||||
|
licenseStatus,
|
||||||
|
expiration,
|
||||||
|
remaining,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// ここに到達することはない
|
||||||
|
return {
|
||||||
|
licenseStatus,
|
||||||
|
expiration: undefined,
|
||||||
|
remaining: undefined,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|||||||
@ -4,14 +4,11 @@ import { LICENSE_STATUS } from "./constants";
|
|||||||
|
|
||||||
// 画面表示用のUserの型を独自に定義
|
// 画面表示用のUserの型を独自に定義
|
||||||
export interface UserView
|
export interface UserView
|
||||||
extends Omit<
|
extends Omit<User, "typistGroupName" | "prompt" | "encryption"> {
|
||||||
User,
|
|
||||||
"typistGroupName" | "prompt" | "encryption" | "remaining"
|
|
||||||
> {
|
|
||||||
authorId: string;
|
authorId: string;
|
||||||
typistGroupName: string[] | string;
|
typistGroupName: string[] | string;
|
||||||
role: string;
|
role: string;
|
||||||
licenseStatus: LicenseStatusType | string;
|
licenseStatus: LicenseStatusType;
|
||||||
prompt: boolean | string;
|
prompt: boolean | string;
|
||||||
encryption: boolean | string;
|
encryption: boolean | string;
|
||||||
emailVerified: boolean;
|
emailVerified: boolean;
|
||||||
@ -19,8 +16,8 @@ export interface UserView
|
|||||||
notification: boolean;
|
notification: boolean;
|
||||||
name: string;
|
name: string;
|
||||||
email: string;
|
email: string;
|
||||||
expiration: string;
|
expiration?: string;
|
||||||
remaining: number | string;
|
remaining?: number;
|
||||||
}
|
}
|
||||||
export interface AddUser {
|
export interface AddUser {
|
||||||
name: string;
|
name: string;
|
||||||
@ -53,8 +50,8 @@ export interface LicenseAllocateUser {
|
|||||||
email: string;
|
email: string;
|
||||||
authorId: string;
|
authorId: string;
|
||||||
licenseStatus: LicenseStatusType | string;
|
licenseStatus: LicenseStatusType | string;
|
||||||
expiration: string;
|
expiration?: string;
|
||||||
remaining: number | string;
|
remaining?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RoleType = typeof USER_ROLES[keyof typeof USER_ROLES];
|
export type RoleType = typeof USER_ROLES[keyof typeof USER_ROLES];
|
||||||
|
|||||||
@ -54,8 +54,8 @@ const initialState: UsersState = {
|
|||||||
email: "",
|
email: "",
|
||||||
authorId: "",
|
authorId: "",
|
||||||
licenseStatus: "",
|
licenseStatus: "",
|
||||||
expiration: "",
|
expiration: undefined,
|
||||||
remaining: "",
|
remaining: undefined,
|
||||||
},
|
},
|
||||||
selectedlicenseId: 0,
|
selectedlicenseId: 0,
|
||||||
hasPasswordMask: false,
|
hasPasswordMask: false,
|
||||||
|
|||||||
@ -1199,6 +1199,7 @@ const DictationPage: React.FC = (): JSX.Element => {
|
|||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{/* タスク削除はCCB後回し分なので今は非表示
|
||||||
<li>
|
<li>
|
||||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
||||||
<a
|
<a
|
||||||
@ -1216,7 +1217,8 @@ const DictationPage: React.FC = (): JSX.Element => {
|
|||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
*/}
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
{displayColumn.JobNumber && (
|
{displayColumn.JobNumber && (
|
||||||
|
|||||||
@ -13,8 +13,12 @@ import {
|
|||||||
} from "features/user";
|
} from "features/user";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { getTranslationID } from "translation";
|
import { getTranslationID } from "translation";
|
||||||
import { isLicenseStatusType, UserView } from "features/user/types";
|
import { LicenseStatusType, UserView } from "features/user/types";
|
||||||
import { LICENSE_STATUS } from "features/user/constants";
|
import {
|
||||||
|
LICENSE_NORMAL,
|
||||||
|
LICENSE_STATUS,
|
||||||
|
NO_LICENSE,
|
||||||
|
} from "features/user/constants";
|
||||||
import { isApproveTier } from "features/auth";
|
import { isApproveTier } from "features/auth";
|
||||||
import { TIERS } from "components/auth/constants";
|
import { TIERS } from "components/auth/constants";
|
||||||
import {
|
import {
|
||||||
@ -184,66 +188,63 @@ const UserListPage: React.FC = (): JSX.Element => {
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
{!isLoading &&
|
{!isLoading &&
|
||||||
users.map((user) => {
|
users.map((user) => (
|
||||||
const { isAlertLicenseStatus, isAlertRemaining } =
|
<tr key={user.email}>
|
||||||
isAlertElement(user.licenseStatus);
|
<td className={styles.clm0}>
|
||||||
return (
|
<ul className={styles.menuInTable}>
|
||||||
<tr key={user.email}>
|
<li>
|
||||||
<td className={styles.clm0}>
|
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
||||||
<ul className={styles.menuInTable}>
|
<a
|
||||||
<li>
|
onClick={() => {
|
||||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
onUpdateOpen(user.id);
|
||||||
<a
|
}}
|
||||||
onClick={() => {
|
>
|
||||||
onUpdateOpen(user.id);
|
{t(
|
||||||
}}
|
getTranslationID(
|
||||||
>
|
"userListPage.label.editUser"
|
||||||
{t(
|
)
|
||||||
getTranslationID(
|
)}
|
||||||
"userListPage.label.editUser"
|
</a>
|
||||||
)
|
</li>
|
||||||
)}
|
{isTier5 && (
|
||||||
</a>
|
<>
|
||||||
</li>
|
<li>
|
||||||
{isTier5 && (
|
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
||||||
<>
|
<a
|
||||||
<li>
|
onClick={() => {
|
||||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
onAllocateLicensePopupOpen(user);
|
||||||
<a
|
}}
|
||||||
onClick={() => {
|
>
|
||||||
onAllocateLicensePopupOpen(user);
|
{t(
|
||||||
}}
|
getTranslationID(
|
||||||
>
|
"userListPage.label.licenseAllocation"
|
||||||
{t(
|
)
|
||||||
getTranslationID(
|
)}
|
||||||
"userListPage.label.licenseAllocation"
|
</a>
|
||||||
)
|
</li>
|
||||||
)}
|
<li>
|
||||||
</a>
|
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
||||||
</li>
|
<a
|
||||||
<li>
|
className={
|
||||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
user.licenseStatus ===
|
||||||
<a
|
LICENSE_STATUS.NOLICENSE
|
||||||
className={
|
? styles.isDisable
|
||||||
user.licenseStatus ===
|
: ""
|
||||||
LICENSE_STATUS.NOLICENSE
|
}
|
||||||
? styles.isDisable
|
onClick={() => {
|
||||||
: ""
|
onLicenseDeallocation(user.id);
|
||||||
}
|
}}
|
||||||
onClick={() => {
|
>
|
||||||
onLicenseDeallocation(user.id);
|
{t(
|
||||||
}}
|
getTranslationID(
|
||||||
>
|
"userListPage.label.licenseDeallocation"
|
||||||
{t(
|
)
|
||||||
getTranslationID(
|
)}
|
||||||
"userListPage.label.licenseDeallocation"
|
</a>
|
||||||
)
|
</li>
|
||||||
)}
|
</>
|
||||||
</a>
|
)}
|
||||||
</li>
|
{/* ユーザー削除 CCB後回し分なので今は非表示
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{/* ユーザー削除 CCB後回し分なので今は非表示
|
|
||||||
<li>
|
<li>
|
||||||
<a href="">
|
<a href="">
|
||||||
{t(
|
{t(
|
||||||
@ -254,48 +255,55 @@ const UserListPage: React.FC = (): JSX.Element => {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
*/}
|
*/}
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td> {user.name}</td>
|
<td> {user.name}</td>
|
||||||
<td>{user.role}</td>
|
<td>{user.role}</td>
|
||||||
<td>{user.authorId}</td>
|
<td>{user.authorId}</td>
|
||||||
<td>{boolToElement(user.encryption)}</td>
|
<td>{boolToElement(user.encryption)}</td>
|
||||||
<td>{boolToElement(user.prompt)}</td>
|
<td>{boolToElement(user.prompt)}</td>
|
||||||
<td>{arrayToElement(user.typistGroupName)}</td>
|
<td>{arrayToElement(user.typistGroupName)}</td>
|
||||||
<td>{user.email}</td>
|
<td>{user.email}</td>
|
||||||
<td>
|
<td>
|
||||||
<span
|
<span
|
||||||
className={
|
className={
|
||||||
isAlertLicenseStatus ? styles.isAlert : ""
|
user.licenseStatus ===
|
||||||
}
|
LICENSE_STATUS.NOLICENSE ||
|
||||||
>
|
user.licenseStatus === LICENSE_STATUS.ALERT
|
||||||
{user.licenseStatus}
|
? styles.isAlert
|
||||||
</span>
|
: ""
|
||||||
</td>
|
}
|
||||||
<td>
|
>
|
||||||
<span
|
{getLicenseStatus(user.licenseStatus)}
|
||||||
className={
|
</span>
|
||||||
isAlertRemaining ? styles.isAlert : ""
|
</td>
|
||||||
}
|
<td>
|
||||||
>
|
<span
|
||||||
{user.expiration}
|
className={
|
||||||
</span>
|
user.licenseStatus === LICENSE_STATUS.ALERT
|
||||||
</td>
|
? styles.isAlert
|
||||||
<td>
|
: ""
|
||||||
<span
|
}
|
||||||
className={
|
>
|
||||||
isAlertRemaining ? styles.isAlert : ""
|
{user.expiration ?? "-"}
|
||||||
}
|
</span>
|
||||||
>
|
</td>
|
||||||
{user.remaining}
|
<td>
|
||||||
</span>
|
<span
|
||||||
</td>
|
className={
|
||||||
<td>{boolToElement(user.autoRenew)}</td>
|
user.licenseStatus === LICENSE_STATUS.ALERT
|
||||||
<td>{boolToElement(user.notification)}</td>
|
? styles.isAlert
|
||||||
<td>{boolToElement(user.emailVerified)}</td>
|
: ""
|
||||||
</tr>
|
}
|
||||||
);
|
>
|
||||||
})}
|
{user.remaining ?? "-"}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>{boolToElement(user.autoRenew)}</td>
|
||||||
|
<td>{boolToElement(user.notification)}</td>
|
||||||
|
<td>{boolToElement(user.emailVerified)}</td>
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{!isLoading && users.length === 0 && (
|
{!isLoading && users.length === 0 && (
|
||||||
@ -352,38 +360,15 @@ const arrayToElement = (
|
|||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
const isAlertElement = (
|
// ライセンスステータスに応じて、ライセンスステータスの文字列を返す
|
||||||
licenseStatus: string
|
const getLicenseStatus = (licenseStatus: LicenseStatusType): string => {
|
||||||
): {
|
|
||||||
isAlertLicenseStatus: boolean;
|
|
||||||
isAlertRemaining: boolean;
|
|
||||||
} => {
|
|
||||||
// licenseStatusの型がLicenseStatusTypeでない場合(Normal)、どちらもfalseにする
|
|
||||||
if (isLicenseStatusType(licenseStatus) === false) {
|
|
||||||
return {
|
|
||||||
isAlertLicenseStatus: false,
|
|
||||||
isAlertRemaining: false,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// licenseStatusがNOLICENSEの場合、isAlertLicenseStatusをtrueにする(Remainingはハイフン)
|
|
||||||
if (licenseStatus === LICENSE_STATUS.NOLICENSE) {
|
if (licenseStatus === LICENSE_STATUS.NOLICENSE) {
|
||||||
return {
|
return NO_LICENSE;
|
||||||
isAlertLicenseStatus: true,
|
|
||||||
isAlertRemaining: false,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
// licenseStatusがALERTの場合、どちらもtrueにする
|
if (licenseStatus === LICENSE_STATUS.NORMAL) {
|
||||||
if (licenseStatus === LICENSE_STATUS.ALERT) {
|
return LICENSE_NORMAL;
|
||||||
return {
|
|
||||||
isAlertLicenseStatus: true,
|
|
||||||
isAlertRemaining: true,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
// licenseStatusがRENEWの場合、どちらもfalseにする
|
return licenseStatus;
|
||||||
return {
|
|
||||||
isAlertLicenseStatus: false,
|
|
||||||
isAlertRemaining: false,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default UserListPage;
|
export default UserListPage;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { DataSource } from "typeorm";
|
import { DataSource } from 'typeorm';
|
||||||
|
|
||||||
export const truncateAllTable = async (source: DataSource) => {
|
export const truncateAllTable = async (source: DataSource) => {
|
||||||
const entities = source.entityMetadatas;
|
const entities = source.entityMetadatas;
|
||||||
@ -18,4 +18,4 @@ export const truncateAllTable = async (source: DataSource) => {
|
|||||||
} finally {
|
} finally {
|
||||||
await queryRunner.release();
|
await queryRunner.release();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -340,7 +340,7 @@ describe('generateDelegationRefreshToken', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -486,7 +486,7 @@ describe('generateDelegationAccessToken', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -597,7 +597,7 @@ describe('updateDelegationAccessToken', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
|
|||||||
@ -46,7 +46,7 @@ describe('publishUploadSas', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -302,7 +302,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -1024,7 +1024,7 @@ describe('音声ファイルダウンロードURL取得', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -1529,7 +1529,7 @@ describe('テンプレートファイルダウンロードURL取得', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -1984,7 +1984,7 @@ describe('publishTemplateFileUploadSas', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -2099,7 +2099,7 @@ describe('templateUploadFinished', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
|
|||||||
@ -32,7 +32,7 @@ describe('ライセンス注文', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -205,7 +205,7 @@ describe('カードライセンス発行', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -295,7 +295,7 @@ describe('カードライセンスを取り込む', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -640,7 +640,7 @@ describe('ライセンス割り当て', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -1220,7 +1220,7 @@ describe('ライセンス割り当て解除', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -1389,7 +1389,7 @@ describe('ライセンス注文キャンセル', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
|
|||||||
@ -12,7 +12,7 @@ describe('利用規約取得', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
|
|||||||
@ -436,7 +436,7 @@ describe('UsersService.createUser', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -1393,7 +1393,7 @@ describe('UsersService.getUsers', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -1882,7 +1882,7 @@ describe('UsersService.updateUser', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -2478,7 +2478,7 @@ describe('UsersService.updateAcceptedVersion', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -2578,7 +2578,7 @@ describe('UsersService.getUserName', () => {
|
|||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -2632,7 +2632,7 @@ describe('UsersService.getRelations', () => {
|
|||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
@ -2708,7 +2708,6 @@ describe('UsersService.getRelations', () => {
|
|||||||
{
|
{
|
||||||
const workflows = await getWorkflows(source, account.id);
|
const workflows = await getWorkflows(source, account.id);
|
||||||
workflows.sort((a, b) => a.id - b.id);
|
workflows.sort((a, b) => a.id - b.id);
|
||||||
|
|
||||||
expect(workflows.length).toBe(4);
|
expect(workflows.length).toBe(4);
|
||||||
expect(workflows[0].worktype_id).toBe(worktype1.id);
|
expect(workflows[0].worktype_id).toBe(worktype1.id);
|
||||||
expect(workflows[0].author_id).toBe(user1);
|
expect(workflows[0].author_id).toBe(user1);
|
||||||
|
|||||||
@ -25,7 +25,7 @@ describe('getWorkflows', () => {
|
|||||||
let source: DataSource | null = null;
|
let source: DataSource | null = null;
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
source = await(async () => {
|
source = await (async () => {
|
||||||
const s = new DataSource({
|
const s = new DataSource({
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
host: 'test_mysql_db',
|
host: 'test_mysql_db',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user