Compare commits

..

No commits in common. "release-2025-05-07-1" and "main" have entirely different histories.

22 changed files with 415 additions and 470 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
import type { RoleType } from "./types";
// LicenseStatusTypeの値を定数オブジェクトにする
export const LICENSE_STATUS = {
NORMAL: "Normal",
@ -11,3 +13,16 @@ export const LICENSE_ALLOCATE_STATUS = {
ALLOCATED: "Allocated",
NOTALLOCATED: "Not Allocated",
} as const;
// NoLicenseの表示
export const NO_LICENSE = "No License" as const;
// ライセンスが割り当てられている場合の表示
export const LICENSE_NORMAL = "License Assigned" as const;
// Roleの表示名
export const ROLE_DISPLAY_NAME: Record<RoleType, string> = {
author: "Author",
typist: "Transcriptionist",
none: "None",
} as const;

View File

@ -9,7 +9,11 @@ import {
isLicenseStatusType,
isRoleType,
} from "./types";
import { LICENSE_STATUS, LICENSE_ALLOCATE_STATUS } from "./constants";
import {
LICENSE_STATUS,
LICENSE_ALLOCATE_STATUS,
ROLE_DISPLAY_NAME,
} from "./constants";
export const selectInputValidationErrors = (state: RootState) => {
const { name, email, role, authorId, encryption, encryptionPassword } =
@ -176,7 +180,8 @@ export const selectUserViews = (state: RootState): UserView[] => {
prompt: convertedValues.prompt,
encryption: convertedValues.encryption,
authorId: convertedValues.authorId,
role,
// roleに応じて表示名を変更する
role: ROLE_DISPLAY_NAME[role],
licenseStatus: convertedLicenseStatus,
expiration: convertedExpiration,
remaining: convertedRemaining,

View File

@ -439,9 +439,8 @@ const DictationPage: React.FC = (): JSX.Element => {
dispatch(listTypistsAsync());
dispatch(listTypistGroupsAsync());
const url = `${
import.meta.env.VITE_DESK_TOP_APP_SCHEME
}:playback?audioId=${audioFileId}`;
const url = `${import.meta.env.VITE_DESK_TOP_APP_SCHEME
}:playback?audioId=${audioFileId}`;
const a = document.createElement("a");
a.href = url;
document.body.appendChild(a);
@ -923,41 +922,6 @@ const DictationPage: React.FC = (): JSX.Element => {
})();
}, [dispatch]);
const getTaskStatus = (taskStatus: string): string => {
switch (taskStatus) {
case STATUS.UPLOADED:
return t(getTranslationID("dictationPage.label.uploaded"));
case STATUS.PENDING:
return t(getTranslationID("dictationPage.label.pending"));
case STATUS.FINISHED:
return t(getTranslationID("dictationPage.label.finished"));
case STATUS.INPROGRESS:
return t(getTranslationID("dictationPage.label.inProgress"));
case STATUS.BACKUP:
return t(getTranslationID("dictationPage.label.backup"));
default:
return taskStatus;
}
};
const getTaskStatusIcon = (taskStatus: string): JSX.Element => {
switch (taskStatus) {
case STATUS.UPLOADED:
return <img src={uploaded} alt="Uploaded" />;
case STATUS.PENDING:
return <img src={pending} alt="Pending" />;
case STATUS.FINISHED:
return <img src={finished} alt="Finished" />;
case STATUS.INPROGRESS:
return <img src={inprogress} alt="InProgress" />;
case STATUS.BACKUP:
return <img src={backup} alt="Backup" />;
default:
// 予期せぬステータスの場合、アイコンを表示しない
return <span></span>;
}
};
return (
<>
<BackupPopup isOpen={isBackupPopupOpen} onClose={onCloseBackupPopup} />
@ -1134,9 +1098,8 @@ const DictationPage: React.FC = (): JSX.Element => {
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
<button
type="submit"
className={`${styles.menuLink} ${
!isLoading ? styles.isActive : ""
}`}
className={`${styles.menuLink} ${!isLoading ? styles.isActive : ""
}`}
>
<img
src={searchIcon}
@ -1195,9 +1158,7 @@ const DictationPage: React.FC = (): JSX.Element => {
</th>
)}
{displayColumn.Priority && (
<th className={styles.clm3}>
{t(getTranslationID("dictationPage.label.priority"))}
</th>
<th className={styles.clm3}>Priority</th>
)}
{displayColumn.Encryption && (
<th className={styles.clm4}>
@ -1576,7 +1537,7 @@ const DictationPage: React.FC = (): JSX.Element => {
<a
className={
x.status !== STATUS.UPLOADED ||
!(isAdmin || isAuthor)
!(isAdmin || isAuthor)
? styles.isDisable
: ""
}
@ -1597,7 +1558,7 @@ const DictationPage: React.FC = (): JSX.Element => {
className={
(x.status === STATUS.INPROGRESS ||
x.status === STATUS.PENDING) &&
(isAdmin || isTypist)
(isAdmin || isTypist)
? ""
: styles.isDisable
}
@ -1618,7 +1579,7 @@ const DictationPage: React.FC = (): JSX.Element => {
<a
className={
x.status === STATUS.FINISHED &&
(isAdmin || isTypist)
(isAdmin || isTypist)
? ""
: styles.isDisable
}
@ -1639,8 +1600,8 @@ const DictationPage: React.FC = (): JSX.Element => {
// タスクのステータスがInprogressまたはPending以外の場合、削除ボタンを活性化する
className={
isDeletableRole &&
x.status !== STATUS.INPROGRESS &&
x.status !== STATUS.PENDING
x.status !== STATUS.INPROGRESS &&
x.status !== STATUS.PENDING
? ""
: styles.isDisable
}
@ -1660,8 +1621,27 @@ const DictationPage: React.FC = (): JSX.Element => {
)}
{displayColumn.Status && (
<td className={styles.clm2}>
{getTaskStatusIcon(x.status)}
{getTaskStatus(x.status)}
{(() => {
switch (x.status) {
case STATUS.UPLOADED:
return (
<img src={uploaded} alt="Uploaded" />
);
case STATUS.PENDING:
return <img src={pending} alt="Pending" />;
case STATUS.FINISHED:
return (
<img src={finished} alt="Finished" />
);
case STATUS.INPROGRESS:
return (
<img src={inprogress} alt="InProgress" />
);
default:
return <img src={backup} alt="Backup" />;
}
})()}
{x.status}
</td>
)}
{displayColumn.Priority && (
@ -1672,14 +1652,8 @@ const DictationPage: React.FC = (): JSX.Element => {
}}
>
{x.priority === "01"
? t(
getTranslationID("dictationPage.label.high")
)
: t(
getTranslationID(
"dictationPage.label.normal"
)
)}
? PRIORITY.HIGH
: PRIORITY.NORMAL}
</td>
)}
{displayColumn.Encryption && (
@ -1823,18 +1797,16 @@ const DictationPage: React.FC = (): JSX.Element => {
)}`}</span>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
<a
className={`${
!isLoading && currentPage !== 1 ? styles.isActive : ""
}`}
className={`${!isLoading && currentPage !== 1 ? styles.isActive : ""
}`}
onClick={getFirstPage}
>
«
</a>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
<a
className={`${
!isLoading && currentPage !== 1 ? styles.isActive : ""
}`}
className={`${!isLoading && currentPage !== 1 ? styles.isActive : ""
}`}
onClick={getPrevPage}
>
@ -1842,22 +1814,20 @@ const DictationPage: React.FC = (): JSX.Element => {
{`${currentPage} of ${totalPage}`}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
<a
className={`${
!isLoading && currentPage < totalPage
className={`${!isLoading && currentPage < totalPage
? styles.isActive
: ""
}`}
}`}
onClick={getNextPage}
>
</a>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
<a
className={`${
!isLoading && currentPage < totalPage
className={`${!isLoading && currentPage < totalPage
? styles.isActive
: ""
}`}
}`}
onClick={getLastPage}
>
»
@ -1885,9 +1855,8 @@ const DictationPage: React.FC = (): JSX.Element => {
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
<a
onClick={onClickBackup}
className={`${styles.menuLink} ${
isAdmin ? styles.isActive : ""
}`}
className={`${styles.menuLink} ${isAdmin ? styles.isActive : ""
}`}
>
<img src={download} alt="" className={styles.menuIcon} />
{t(getTranslationID("dictationPage.label.fileBackup"))}

View File

@ -14,10 +14,14 @@ import {
} from "features/user";
import { useTranslation } from "react-i18next";
import { getTranslationID } from "translation";
import { UserView } from "features/user/types";
import { LICENSE_STATUS } from "features/user/constants";
import { LicenseStatusType, UserView } from "features/user/types";
import {
LICENSE_NORMAL,
LICENSE_STATUS,
NO_LICENSE,
} from "features/user/constants";
import { isApproveTier } from "features/auth";
import { TIERS, USER_ROLES } from "components/auth/constants";
import { TIERS } from "components/auth/constants";
import {
changeUpdateUser,
changeLicenseAllocateUser,
@ -161,33 +165,6 @@ const UserListPage: React.FC = (): JSX.Element => {
const isTier5 =
isApproveTier([TIERS.TIER5]) || delegationAccessToken !== null;
const getUserRole = (userRole: string): string => {
switch (userRole) {
case USER_ROLES.AUTHOR:
return t(getTranslationID("userListPage.label.author"));
case USER_ROLES.TYPIST:
return t(getTranslationID("userListPage.label.transcriptionist"));
default:
return t(getTranslationID("userListPage.label.none"));
}
};
// ライセンスステータスに応じて、ライセンスステータスの文字列を返す
const getLicenseStatus = (licenseStatus: string): string => {
switch (licenseStatus) {
case LICENSE_STATUS.NOLICENSE:
return t(getTranslationID("userListPage.label.notAllocated"));
case LICENSE_STATUS.ALERT:
return t(getTranslationID("userListPage.label.alert"));
case LICENSE_STATUS.RENEW:
return t(getTranslationID("userListPage.label.renew"));
case LICENSE_STATUS.NORMAL:
return t(getTranslationID("userListPage.label.allocated"));
default:
return licenseStatus;
}
};
return (
<>
<UserUpdatePopup
@ -444,7 +421,7 @@ const UserListPage: React.FC = (): JSX.Element => {
</ul>
</td>
<td> {user.name}</td>
<td>{getUserRole(user.role)}</td>
<td>{user.role}</td>
<td>{user.authorId}</td>
<td>{boolToElement(user.encryption)}</td>
<td>{boolToElement(user.prompt)}</td>
@ -547,4 +524,15 @@ const arrayToElement = (
));
};
// ライセンスステータスに応じて、ライセンスステータスの文字列を返す
const getLicenseStatus = (licenseStatus: LicenseStatusType): string => {
if (licenseStatus === LICENSE_STATUS.NOLICENSE) {
return NO_LICENSE;
}
if (licenseStatus === LICENSE_STATUS.NORMAL) {
return LICENSE_NORMAL;
}
return licenseStatus;
};
export default UserListPage;

View File

@ -54,7 +54,7 @@
},
"text": {
"maintenanceNotificationTitle": "Hinweis auf geplante Wartungsarbeiten",
"maintenanceNotification": "Aufgrund von Systemwartungsarbeiten wird ODMS Cloud ab dem 7. Mai, 6:00 Uhr UTC-Zeit, etwa eine Stunde lang nicht verfügbar sein. Wir entschuldigen uns für etwaige Unannehmlichkeiten, die während der Wartung entstanden sind."
"maintenanceNotification": "Aufgrund von Systemwartungsarbeiten wird ODMS Cloud ab dem 27. Januar, 6:00 Uhr UTC-Zeit, etwa eine Stunde lang nicht verfügbar sein. Wir entschuldigen uns für etwaige Unannehmlichkeiten, die während der Wartung entstanden sind."
}
},
"signupPage": {
@ -197,11 +197,7 @@
"promptLabel": "Eingabeaufforderung",
"addUsers": "Benutzer hinzufügen",
"forceEmailVerification": "E-Mail-Verifizierung erzwingen",
"search": "Suche",
"allocated": "Lizenz zugewiesen",
"notAllocated": "Keine Liszenz",
"alert": "Alarm",
"renew": "Erneuern"
"search": "Suche"
},
"text": {
"downloadExplain": "Bitte laden Sie die CSV-Beispieldatei herunter und geben Sie die erforderlichen Informationen gemäß den folgenden Regeln ein.",
@ -322,9 +318,7 @@
"rawFileName": "Ursprünglicher Dateiname",
"fileNameSave": "Führen Sie eine Dateiumbenennung durch",
"reopenDictation": "Status auf „Ausstehend“ ändern",
"search": "Suche",
"high": "Hoch",
"normal": "Normal"
"search": "Suche"
}
},
"cardLicenseIssuePopupPage": {
@ -697,4 +691,4 @@
"title": "Konto durchsuchen"
}
}
}
}

View File

@ -54,7 +54,7 @@
},
"text": {
"maintenanceNotificationTitle": "Notice of scheduled maintenance",
"maintenanceNotification": "Due to system maintenance, ODMS Cloud will be unavailable for approximately one hour starting from May 7th, 6:00AM UTC time. We apologize for any inconvenience caused during the maintenance."
"maintenanceNotification": "Due to system maintenance, ODMS Cloud will be unavailable for approximately one hour starting from January 27th, 6:00AM UTC time. We apologize for any inconvenience caused during the maintenance."
}
},
"signupPage": {
@ -197,11 +197,7 @@
"promptLabel": "Prompt",
"addUsers": "Add User",
"forceEmailVerification": "Force Email Verification",
"search": "Search",
"allocated": "License Assigned",
"notAllocated": "No License",
"alert": "Alert",
"renew": "Renew"
"search": "Search"
},
"text": {
"downloadExplain": "Please download the sample CSV file and apply the required information according to the rules below.",
@ -322,9 +318,7 @@
"rawFileName": "Original File Name",
"fileNameSave": "Execute file rename",
"reopenDictation": "Change status to Pending",
"search": "Search",
"high": "High",
"normal": "Normal"
"search": "Search"
}
},
"cardLicenseIssuePopupPage": {
@ -697,4 +691,4 @@
"title": "Search Account"
}
}
}
}

View File

@ -54,7 +54,7 @@
},
"text": {
"maintenanceNotificationTitle": "Aviso de mantenimiento programado",
"maintenanceNotification": "Debido al mantenimiento del sistema, ODMS Cloud no estará disponible durante aproximadamente una hora a partir del 7 de mayo a las 6:00 am, hora UTC. Pedimos disculpas por cualquier inconveniente causado durante el mantenimiento."
"maintenanceNotification": "Debido al mantenimiento del sistema, ODMS Cloud no estará disponible durante aproximadamente una hora a partir del 27 de enero a las 6:00 am, hora UTC. Pedimos disculpas por cualquier inconveniente causado durante el mantenimiento."
}
},
"signupPage": {
@ -197,11 +197,7 @@
"promptLabel": "Solicitar",
"addUsers": "Agregar usuario",
"forceEmailVerification": "Verificación forzada de correo electrónico",
"search": "Búsqueda",
"allocated": "Licencia asignada",
"notAllocated": "Sin Lisencia",
"alert": "Alerta",
"renew": "Renovar"
"search": "Búsqueda"
},
"text": {
"downloadExplain": "Descargue el archivo CSV de muestra y aplique la información requerida de acuerdo con las reglas siguientes.",
@ -322,9 +318,7 @@
"rawFileName": "Nombre de archivo original",
"fileNameSave": "Ejecutar cambio de nombre de archivo",
"reopenDictation": "Cambiar el estado a Pendiente",
"search": "Búsqueda",
"high": "Alto",
"normal": "Normal"
"search": "Búsqueda"
}
},
"cardLicenseIssuePopupPage": {
@ -697,4 +691,4 @@
"title": "Buscar cuenta"
}
}
}
}

View File

@ -54,7 +54,7 @@
},
"text": {
"maintenanceNotificationTitle": "Avis de maintenance programmée",
"maintenanceNotification": "En raison de la maintenance du système, ODMS Cloud sera indisponible pendant environ une heure à partir du 7 Mai à 6h00, heure UTC. Nous nous excusons pour tout inconvénient causé lors de la maintenance."
"maintenanceNotification": "En raison de la maintenance du système, ODMS Cloud sera indisponible pendant environ une heure à partir du 27 janvier à 6h00, heure UTC. Nous nous excusons pour tout inconvénient causé lors de la maintenance."
}
},
"signupPage": {
@ -197,11 +197,7 @@
"promptLabel": "Invite",
"addUsers": "Ajouter un utilisateur",
"forceEmailVerification": "Forcer la vérification de l'e-mail",
"search": "Recherche",
"allocated": "Licence attribuée",
"notAllocated": "Pas de Lisence",
"alert": "Alerte",
"renew": "Renouveler"
"search": "Recherche"
},
"text": {
"downloadExplain": "Veuillez télécharger l'exemple de fichier CSV et appliquer les informations requises conformément aux règles ci-dessous.",
@ -322,9 +318,7 @@
"rawFileName": "Nom du fichier d'origine",
"fileNameSave": "Exécuter le changement de nom du fichier",
"reopenDictation": "Changer le statut en Suspendu",
"search": "Recherche",
"high": "Haut",
"normal": "Normale"
"search": "Recherche"
}
},
"cardLicenseIssuePopupPage": {
@ -660,7 +654,7 @@
"label": {
"title": "Paramètre de suppression automatique de fichiers",
"autoFileDeleteCheck": "Suppression automatique des fichiers",
"daysAnnotation": "Nombre de jours à compter de la fin de la transcription pour supprimer les fichiers.",
"daysAnnotation": "Número de días desde que finalizó la transcripción para eliminar los archivos.",
"days": "Jours",
"saveButton": "Enregistrer les paramètres",
"daysValidationError": "Veuillez saisir un nombre compris entre 1 et 999 pour les jours."
@ -697,4 +691,4 @@
"title": "Rechercher un compte"
}
}
}
}

View File

@ -22,7 +22,7 @@ export class AudioFile {
@Column()
started_at: Date;
@Column({ type: "time" })
duration: number;
duration: string;
@Column()
finished_at: Date;
@Column()

View File

@ -564,7 +564,7 @@ export const makeTestTask = async (
author_id: "test_author",
work_type_id: "test_work_type",
started_at: new Date(),
duration: 0,
duration: "00:00:00",
finished_at: new Date(),
uploaded_at: new Date(),
file_size: 1024,

View File

@ -1282,7 +1282,7 @@ describe("deleteRecords | 削除対象タスク等を削除できる", () => {
author_id: "test_author",
work_type_id: "test_work_type",
started_at: new Date(),
duration: 0,
duration: "00:00:00",
finished_at: new Date(),
uploaded_at: new Date(),
file_size: 1024,

View File

@ -1,7 +0,0 @@
-- +migrate Up
ALTER TABLE `audio_files`
MODIFY COLUMN `duration` BIGINT UNSIGNED NOT NULL COMMENT '録音時間';
-- +migrate Down
ALTER TABLE `audio_files`
MODIFY COLUMN `duration` VARCHAR(255) NOT NULL COMMENT '録音時間';

View File

@ -247,7 +247,7 @@ export const createAudioFile = async (
author_id: 'author_id',
work_type_id: '',
started_at: new Date(),
duration: 100000,
duration: '100000',
finished_at: new Date(),
uploaded_at: new Date(),
file_size: fileSize,

View File

@ -351,7 +351,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -457,7 +457,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -584,7 +584,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
'XXXXXX', // 存在しないAuthorIDを指定
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -644,7 +644,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -723,7 +723,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -832,7 +832,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -922,7 +922,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1011,7 +1011,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1105,7 +1105,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1148,7 +1148,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'yyyy-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1192,7 +1192,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1233,7 +1233,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
'authorAuthorId',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1284,7 +1284,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1395,7 +1395,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1514,7 +1514,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1643,7 +1643,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1772,7 +1772,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -1891,7 +1891,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -2038,7 +2038,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -2188,7 +2188,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
@ -2338,7 +2338,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip',
authorAuthorId ?? '',
'file.zip',
"100000",
'11:22:33',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444',

View File

@ -69,7 +69,7 @@ export const createTask = async (
author_id: author_id ?? 'DEFAULT_ID',
work_type_id: 'work_type_id',
started_at: new Date(),
duration: 100000,
duration: '100000',
finished_at: new Date(),
uploaded_at: new Date(),
file_size: fileSize ?? 10000,

View File

@ -264,7 +264,7 @@ describe('TasksService', () => {
author_id: 'AUTHOR',
work_type_id: 'WorkType',
started_at: new Date('2023-01-01T01:01:01.000'),
duration: 123000,
duration: '123000',
finished_at: new Date('2023-01-01T01:01:01.000'),
uploaded_at: new Date('2023-01-01T01:01:01.000'),
file_size: 123000,

View File

@ -465,7 +465,7 @@ const defaultTasksRepositoryMockValue: {
author_id: 'AUTHOR',
work_type_id: 'WorkType',
started_at: new Date('2023-01-01T01:01:01.000Z'),
duration: 123000,
duration: '123000',
finished_at: new Date('2023-01-01T01:01:01.000Z'),
uploaded_at: new Date('2023-01-01T01:01:01.000Z'),
file_size: 123000,

View File

@ -127,7 +127,7 @@ export const createTask = async (
author_id: author_id,
work_type_id: work_type_id,
started_at: new Date(),
duration: 100000,
duration: '100000',
finished_at: new Date(),
uploaded_at: new Date(),
file_size: 10000,
@ -183,7 +183,7 @@ export const createAudioFile = async (
author_id: author_id,
work_type_id: work_type_id,
started_at: new Date(),
duration: 100000,
duration: '100000',
finished_at: new Date(),
uploaded_at: new Date(),
file_size: 10000,

View File

@ -60,7 +60,7 @@ const createTask = (
authorId: file.author_id,
workType: file.work_type_id,
audioCreatedDate: file.started_at.toISOString(),
audioDuration: file.duration.toString(),
audioDuration: file.duration,
audioFinishedDate: file.finished_at.toISOString(),
audioUploadedDate: file.uploaded_at.toISOString(),
audioFormat: file.audio_format,

View File

@ -23,7 +23,7 @@ export class AudioFile {
@Column()
started_at: Date;
@Column({ type: 'time' })
duration: number;
duration: string;
@Column()
finished_at: Date;
@Column()

View File

@ -1028,8 +1028,7 @@ export class TasksRepositoryService {
audioFile.author_id = author_id;
audioFile.work_type_id = work_type_id;
audioFile.started_at = started_at;
// 数値型のdurationカラムにinsertするため文字列から数値型に変換する
audioFile.duration = parseInt(duration, 10);
audioFile.duration = duration;
audioFile.finished_at = finished_at;
audioFile.uploaded_at = uploaded_at;
audioFile.file_size = file_size;