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の値を定数オブジェクトにする // LicenseStatusTypeの値を定数オブジェクトにする
export const LICENSE_STATUS = { export const LICENSE_STATUS = {
NORMAL: "Normal", NORMAL: "Normal",
@ -11,3 +13,16 @@ 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;
// 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, isLicenseStatusType,
isRoleType, isRoleType,
} from "./types"; } 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) => { export const selectInputValidationErrors = (state: RootState) => {
const { name, email, role, authorId, encryption, encryptionPassword } = const { name, email, role, authorId, encryption, encryptionPassword } =
@ -176,7 +180,8 @@ export const selectUserViews = (state: RootState): UserView[] => {
prompt: convertedValues.prompt, prompt: convertedValues.prompt,
encryption: convertedValues.encryption, encryption: convertedValues.encryption,
authorId: convertedValues.authorId, authorId: convertedValues.authorId,
role, // roleに応じて表示名を変更する
role: ROLE_DISPLAY_NAME[role],
licenseStatus: convertedLicenseStatus, licenseStatus: convertedLicenseStatus,
expiration: convertedExpiration, expiration: convertedExpiration,
remaining: convertedRemaining, remaining: convertedRemaining,

View File

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

View File

@ -14,10 +14,14 @@ 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 { 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, USER_ROLES } from "components/auth/constants"; import { TIERS } from "components/auth/constants";
import { import {
changeUpdateUser, changeUpdateUser,
changeLicenseAllocateUser, changeLicenseAllocateUser,
@ -161,33 +165,6 @@ const UserListPage: React.FC = (): JSX.Element => {
const isTier5 = const isTier5 =
isApproveTier([TIERS.TIER5]) || delegationAccessToken !== null; 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 ( return (
<> <>
<UserUpdatePopup <UserUpdatePopup
@ -444,7 +421,7 @@ const UserListPage: React.FC = (): JSX.Element => {
</ul> </ul>
</td> </td>
<td> {user.name}</td> <td> {user.name}</td>
<td>{getUserRole(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>
@ -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; export default UserListPage;

View File

@ -54,7 +54,7 @@
}, },
"text": { "text": {
"maintenanceNotificationTitle": "Hinweis auf geplante Wartungsarbeiten", "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": { "signupPage": {
@ -197,11 +197,7 @@
"promptLabel": "Eingabeaufforderung", "promptLabel": "Eingabeaufforderung",
"addUsers": "Benutzer hinzufügen", "addUsers": "Benutzer hinzufügen",
"forceEmailVerification": "E-Mail-Verifizierung erzwingen", "forceEmailVerification": "E-Mail-Verifizierung erzwingen",
"search": "Suche", "search": "Suche"
"allocated": "Lizenz zugewiesen",
"notAllocated": "Keine Liszenz",
"alert": "Alarm",
"renew": "Erneuern"
}, },
"text": { "text": {
"downloadExplain": "Bitte laden Sie die CSV-Beispieldatei herunter und geben Sie die erforderlichen Informationen gemäß den folgenden Regeln ein.", "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", "rawFileName": "Ursprünglicher Dateiname",
"fileNameSave": "Führen Sie eine Dateiumbenennung durch", "fileNameSave": "Führen Sie eine Dateiumbenennung durch",
"reopenDictation": "Status auf „Ausstehend“ ändern", "reopenDictation": "Status auf „Ausstehend“ ändern",
"search": "Suche", "search": "Suche"
"high": "Hoch",
"normal": "Normal"
} }
}, },
"cardLicenseIssuePopupPage": { "cardLicenseIssuePopupPage": {
@ -697,4 +691,4 @@
"title": "Konto durchsuchen" "title": "Konto durchsuchen"
} }
} }
} }

View File

@ -54,7 +54,7 @@
}, },
"text": { "text": {
"maintenanceNotificationTitle": "Notice of scheduled maintenance", "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": { "signupPage": {
@ -197,11 +197,7 @@
"promptLabel": "Prompt", "promptLabel": "Prompt",
"addUsers": "Add User", "addUsers": "Add User",
"forceEmailVerification": "Force Email Verification", "forceEmailVerification": "Force Email Verification",
"search": "Search", "search": "Search"
"allocated": "License Assigned",
"notAllocated": "No License",
"alert": "Alert",
"renew": "Renew"
}, },
"text": { "text": {
"downloadExplain": "Please download the sample CSV file and apply the required information according to the rules below.", "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", "rawFileName": "Original File Name",
"fileNameSave": "Execute file rename", "fileNameSave": "Execute file rename",
"reopenDictation": "Change status to Pending", "reopenDictation": "Change status to Pending",
"search": "Search", "search": "Search"
"high": "High",
"normal": "Normal"
} }
}, },
"cardLicenseIssuePopupPage": { "cardLicenseIssuePopupPage": {
@ -697,4 +691,4 @@
"title": "Search Account" "title": "Search Account"
} }
} }
} }

View File

@ -54,7 +54,7 @@
}, },
"text": { "text": {
"maintenanceNotificationTitle": "Aviso de mantenimiento programado", "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": { "signupPage": {
@ -197,11 +197,7 @@
"promptLabel": "Solicitar", "promptLabel": "Solicitar",
"addUsers": "Agregar usuario", "addUsers": "Agregar usuario",
"forceEmailVerification": "Verificación forzada de correo electrónico", "forceEmailVerification": "Verificación forzada de correo electrónico",
"search": "Búsqueda", "search": "Búsqueda"
"allocated": "Licencia asignada",
"notAllocated": "Sin Lisencia",
"alert": "Alerta",
"renew": "Renovar"
}, },
"text": { "text": {
"downloadExplain": "Descargue el archivo CSV de muestra y aplique la información requerida de acuerdo con las reglas siguientes.", "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", "rawFileName": "Nombre de archivo original",
"fileNameSave": "Ejecutar cambio de nombre de archivo", "fileNameSave": "Ejecutar cambio de nombre de archivo",
"reopenDictation": "Cambiar el estado a Pendiente", "reopenDictation": "Cambiar el estado a Pendiente",
"search": "Búsqueda", "search": "Búsqueda"
"high": "Alto",
"normal": "Normal"
} }
}, },
"cardLicenseIssuePopupPage": { "cardLicenseIssuePopupPage": {
@ -697,4 +691,4 @@
"title": "Buscar cuenta" "title": "Buscar cuenta"
} }
} }
} }

View File

@ -54,7 +54,7 @@
}, },
"text": { "text": {
"maintenanceNotificationTitle": "Avis de maintenance programmée", "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": { "signupPage": {
@ -197,11 +197,7 @@
"promptLabel": "Invite", "promptLabel": "Invite",
"addUsers": "Ajouter un utilisateur", "addUsers": "Ajouter un utilisateur",
"forceEmailVerification": "Forcer la vérification de l'e-mail", "forceEmailVerification": "Forcer la vérification de l'e-mail",
"search": "Recherche", "search": "Recherche"
"allocated": "Licence attribuée",
"notAllocated": "Pas de Lisence",
"alert": "Alerte",
"renew": "Renouveler"
}, },
"text": { "text": {
"downloadExplain": "Veuillez télécharger l'exemple de fichier CSV et appliquer les informations requises conformément aux règles ci-dessous.", "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", "rawFileName": "Nom du fichier d'origine",
"fileNameSave": "Exécuter le changement de nom du fichier", "fileNameSave": "Exécuter le changement de nom du fichier",
"reopenDictation": "Changer le statut en Suspendu", "reopenDictation": "Changer le statut en Suspendu",
"search": "Recherche", "search": "Recherche"
"high": "Haut",
"normal": "Normale"
} }
}, },
"cardLicenseIssuePopupPage": { "cardLicenseIssuePopupPage": {
@ -660,7 +654,7 @@
"label": { "label": {
"title": "Paramètre de suppression automatique de fichiers", "title": "Paramètre de suppression automatique de fichiers",
"autoFileDeleteCheck": "Suppression automatique des 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", "days": "Jours",
"saveButton": "Enregistrer les paramètres", "saveButton": "Enregistrer les paramètres",
"daysValidationError": "Veuillez saisir un nombre compris entre 1 et 999 pour les jours." "daysValidationError": "Veuillez saisir un nombre compris entre 1 et 999 pour les jours."
@ -697,4 +691,4 @@
"title": "Rechercher un compte" "title": "Rechercher un compte"
} }
} }
} }

View File

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

View File

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

View File

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

View File

@ -351,7 +351,7 @@ describe('タスク作成から自動ルーティング(DB使用)', () => {
'http://blob/url/file.zip', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
'XXXXXX', // 存在しないAuthorIDを指定 'XXXXXX', // 存在しないAuthorIDを指定
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る authorAuthorId ?? '', // 音声ファイルの情報には、録音者のAuthorIDが入る
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'yyyy-05-26T11:22:33.444', 'yyyy-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '2023-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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
'authorAuthorId', 'authorAuthorId',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', 'http://blob/url/file.zip',
authorAuthorId ?? '', authorAuthorId ?? '',
'file.zip', 'file.zip',
"100000", '11:22:33',
'2023-05-26T11:22:33.444', '2023-05-26T11:22:33.444',
'2023-05-26T11:22:33.444', '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', author_id: author_id ?? 'DEFAULT_ID',
work_type_id: 'work_type_id', work_type_id: 'work_type_id',
started_at: new Date(), started_at: new Date(),
duration: 100000, duration: '100000',
finished_at: new Date(), finished_at: new Date(),
uploaded_at: new Date(), uploaded_at: new Date(),
file_size: fileSize ?? 10000, file_size: fileSize ?? 10000,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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