Merge branch 'develop' into ccb
# Conflicts: # dictation_client/src/pages/UserListPage/index.tsx
This commit is contained in:
commit
3877a4670d
@ -353,6 +353,7 @@ export const DisPlayInfo: React.FC = (): JSX.Element => {
|
||||
<li>
|
||||
<label htmlFor="comment">
|
||||
<input
|
||||
id="comment"
|
||||
type="checkbox"
|
||||
value="clm16"
|
||||
className={styles.formCheck}
|
||||
|
||||
@ -1166,13 +1166,7 @@ const DictationPage: React.FC = (): JSX.Element => {
|
||||
{(isChangeTranscriptionistPopupOpen || !isLoading) &&
|
||||
tasks.length !== 0 &&
|
||||
tasks.map((x) => (
|
||||
<tr
|
||||
key={x.audioFileId}
|
||||
style={{
|
||||
backgroundColor:
|
||||
x.priority === "01" ? "#ff00004f" : "#ffffff",
|
||||
}}
|
||||
>
|
||||
<tr key={x.audioFileId}>
|
||||
<td className={styles.clm0}>
|
||||
<ul className={styles.menuInTable}>
|
||||
<li>
|
||||
@ -1288,7 +1282,12 @@ const DictationPage: React.FC = (): JSX.Element => {
|
||||
</td>
|
||||
)}
|
||||
{displayColumn.Priority && (
|
||||
<td className={styles.clm3}>
|
||||
<td
|
||||
className={styles.clm3}
|
||||
style={{
|
||||
color: x.priority === "01" ? "red" : undefined,
|
||||
}}
|
||||
>
|
||||
{x.priority === "01"
|
||||
? PRIORITY.HIGH
|
||||
: PRIORITY.NORMAL}
|
||||
|
||||
@ -171,8 +171,11 @@ export const LicenseOrderHistory: React.FC<LicenseOrderHistoryProps> = (
|
||||
<div>
|
||||
<div className={styles.pageHeader}>
|
||||
<h1 className={styles.pageTitle}>
|
||||
{t(getTranslationID("orderHistoriesPage.label.title"))}
|
||||
{t(getTranslationID("LicenseSummaryPage.label.title"))}
|
||||
</h1>
|
||||
<p className={styles.pageTx}>
|
||||
{t(getTranslationID("orderHistoriesPage.label.orderHistory"))}
|
||||
</p>
|
||||
</div>
|
||||
<section className={styles.license}>
|
||||
<div>
|
||||
|
||||
@ -166,12 +166,17 @@ const UserListPage: React.FC = (): JSX.Element => {
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div className={styles.tableWrap}>
|
||||
<table className={`${styles.table} ${styles.user}`}>
|
||||
<tbody>
|
||||
<tr className={styles.tableHeader}>
|
||||
<th className={styles.clm0}>{/** th is empty */}</th>
|
||||
<th>{t(getTranslationID("userListPage.label.name"))}</th>
|
||||
<th>{t(getTranslationID("userListPage.label.role"))}</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.name"))}
|
||||
</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.role"))}
|
||||
</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.authorID"))}
|
||||
</th>
|
||||
@ -182,9 +187,13 @@ const UserListPage: React.FC = (): JSX.Element => {
|
||||
{t(getTranslationID("userListPage.label.prompt"))}
|
||||
</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.typistGroup"))}
|
||||
{t(
|
||||
getTranslationID("userListPage.label.typistGroup")
|
||||
)}
|
||||
</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.email"))}
|
||||
</th>
|
||||
<th>{t(getTranslationID("userListPage.label.email"))}</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.status"))}
|
||||
</th>
|
||||
@ -198,7 +207,9 @@ const UserListPage: React.FC = (): JSX.Element => {
|
||||
{t(getTranslationID("userListPage.label.autoRenew"))}
|
||||
</th>
|
||||
<th>
|
||||
{t(getTranslationID("userListPage.label.notification"))}
|
||||
{t(
|
||||
getTranslationID("userListPage.label.notification")
|
||||
)}
|
||||
</th>
|
||||
<th>
|
||||
{t(
|
||||
@ -328,6 +339,7 @@ const UserListPage: React.FC = (): JSX.Element => {
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{!isLoading && users.length === 0 && (
|
||||
<p
|
||||
style={{
|
||||
|
||||
@ -128,19 +128,26 @@ export const EditOptionItemsPopup: React.FC<EditOptionItemsPopupProps> = (
|
||||
<dl className={`${styles.formList} ${styles.hasbg}`}>
|
||||
<dd className={styles.full}>
|
||||
<div className={styles.tableWrap}>
|
||||
<table className={styles.table}>
|
||||
<table className={`${styles.table} ${styles.optionItem}`}>
|
||||
<tbody>
|
||||
<tr className={styles.tableHeader}>
|
||||
<th className={styles.noLine}>
|
||||
{t(getTranslationID("worktypeIdSetting.label.itemLabel"))}
|
||||
{t(
|
||||
getTranslationID("worktypeIdSetting.label.itemLabel")
|
||||
)}
|
||||
</th>
|
||||
<th className={styles.noLine}>
|
||||
{t(
|
||||
getTranslationID("worktypeIdSetting.label.defaultValue")
|
||||
getTranslationID(
|
||||
"worktypeIdSetting.label.defaultValue"
|
||||
)
|
||||
)}
|
||||
</th>
|
||||
<th>
|
||||
{t(
|
||||
getTranslationID("worktypeIdSetting.label.initialValue")
|
||||
getTranslationID(
|
||||
"worktypeIdSetting.label.initialValue"
|
||||
)
|
||||
)}
|
||||
</th>
|
||||
</tr>
|
||||
@ -188,9 +195,13 @@ export const EditOptionItemsPopup: React.FC<EditOptionItemsPopupProps> = (
|
||||
)
|
||||
)}
|
||||
</option>
|
||||
<option value={OPTION_ITEMS_DEFAULT_VALUE_TYPE.BLANK}>
|
||||
<option
|
||||
value={OPTION_ITEMS_DEFAULT_VALUE_TYPE.BLANK}
|
||||
>
|
||||
{t(
|
||||
getTranslationID("worktypeIdSetting.label.blank")
|
||||
getTranslationID(
|
||||
"worktypeIdSetting.label.blank"
|
||||
)
|
||||
)}
|
||||
</option>
|
||||
<option
|
||||
@ -229,6 +240,20 @@ export const EditOptionItemsPopup: React.FC<EditOptionItemsPopupProps> = (
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
<tr>
|
||||
<td colSpan={3}>
|
||||
<span
|
||||
className={`${styles.formComment} ${styles.alignCenter}`}
|
||||
>
|
||||
{t(
|
||||
getTranslationID(
|
||||
"worktypeIdSetting.label.optionItemTerms"
|
||||
)
|
||||
)}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{isPushSaveButton && hasInvalidOptionItems && (
|
||||
<span className={`${styles.formError} ${styles.alignCenter}`}>
|
||||
@ -248,14 +273,6 @@ export const EditOptionItemsPopup: React.FC<EditOptionItemsPopupProps> = (
|
||||
)}
|
||||
</span>
|
||||
)}
|
||||
<span
|
||||
style={{ display: "block" }}
|
||||
className={`${styles.formComment} ${styles.alignCenter}`}
|
||||
>
|
||||
{t(
|
||||
getTranslationID("worktypeIdSetting.label.optionItemTerms")
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd className={`${styles.full} ${styles.alignCenter}`}>
|
||||
|
||||
@ -1130,6 +1130,9 @@ h3 + .brCrumb .tlIcon {
|
||||
.modal .form .table.backup td:first-child {
|
||||
padding: 0.6rem 0.2rem;
|
||||
}
|
||||
.modal .form .table.optionItem select {
|
||||
width: 123px;
|
||||
}
|
||||
.modal .form .pagenation {
|
||||
margin-bottom: 1.5rem;
|
||||
padding-right: 2.5%;
|
||||
@ -1597,15 +1600,6 @@ _:-ms-lang(x)::-ms-backdrop,
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
.account .table.user,
|
||||
.user .table.user,
|
||||
.license .table.user,
|
||||
.dictation .table.user,
|
||||
.partners .table.user,
|
||||
.workflow .table.user,
|
||||
.support .table.user {
|
||||
margin-bottom: 5rem;
|
||||
}
|
||||
.account .table.user th::after,
|
||||
.user .table.user th::after,
|
||||
.license .table.user th::after,
|
||||
@ -1626,6 +1620,16 @@ _:-ms-lang(x)::-ms-backdrop,
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.user .table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.user .tableWrap {
|
||||
max-width: calc(100vw - 5.1rem);
|
||||
max-height: 90vh;
|
||||
overflow-x: scroll;
|
||||
margin-bottom: 5rem;
|
||||
}
|
||||
|
||||
.account .listVertical {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
@ -2488,10 +2492,13 @@ tr.isSelected .menuInTable li a.isDisable {
|
||||
.formChange ul.chooseMember li input + label,
|
||||
.formChange ul.holdMember li input + label {
|
||||
display: block;
|
||||
padding: 0.2rem 0 0.2rem 1.5rem;
|
||||
padding: 0.4rem 0 0.4rem 1.5rem;
|
||||
margin-right: 0;
|
||||
background: url(../assets/images/circle.svg) no-repeat left center;
|
||||
background-size: 1.3rem;
|
||||
white-space: pre-line;
|
||||
word-break: break-all;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.formChange ul.chooseMember li input + label:hover,
|
||||
.formChange ul.holdMember li input + label:hover {
|
||||
@ -2501,7 +2508,7 @@ tr.isSelected .menuInTable li a.isDisable {
|
||||
}
|
||||
.formChange ul.chooseMember li input:checked + label,
|
||||
.formChange ul.holdMember li input:checked + label {
|
||||
padding: 0.2rem 1rem 0.2rem 0;
|
||||
padding: 0.4rem 1.5rem 0.4rem 0;
|
||||
background: url(../assets/images/check_circle_fill.svg) no-repeat right center;
|
||||
background-size: 1.3rem;
|
||||
}
|
||||
|
||||
@ -74,6 +74,7 @@ declare const classNames: {
|
||||
readonly table: "table";
|
||||
readonly tableHeader: "tableHeader";
|
||||
readonly backup: "backup";
|
||||
readonly optionItem: "optionItem";
|
||||
readonly pagenation: "pagenation";
|
||||
readonly encryptionPass: "encryptionPass";
|
||||
readonly pageHeader: "pageHeader";
|
||||
|
||||
@ -18,14 +18,21 @@ import {
|
||||
} from './test/utility';
|
||||
import { UsersService } from '../users/users.service';
|
||||
import { Context, makeContext } from '../../common/log';
|
||||
import { ADB2C_SIGN_IN_TYPE, LICENSE_ALLOCATED_STATUS, LICENSE_TYPE } from '../../constants';
|
||||
import {
|
||||
ADB2C_SIGN_IN_TYPE,
|
||||
LICENSE_ALLOCATED_STATUS,
|
||||
LICENSE_TYPE,
|
||||
} from '../../constants';
|
||||
import {
|
||||
makeHierarchicalAccounts,
|
||||
makeTestSimpleAccount,
|
||||
makeTestUser,
|
||||
} from '../../common/test/utility';
|
||||
import { LicensesRepositoryService } from '../../repositories/licenses/licenses.repository.service';
|
||||
import { overrideAdB2cService, overrideSendgridService } from '../../common/test/overrides';
|
||||
import {
|
||||
overrideAdB2cService,
|
||||
overrideSendgridService,
|
||||
} from '../../common/test/overrides';
|
||||
import { truncateAllTable } from '../../common/test/init';
|
||||
|
||||
describe('ライセンス注文', () => {
|
||||
@ -672,7 +679,10 @@ describe('ライセンス割り当て', () => {
|
||||
const module = await makeTestingModule(source);
|
||||
if (!module) fail();
|
||||
|
||||
const { id: dealerId } = await makeTestSimpleAccount(source, { company_name: "DEALER_COMPANY", tier: 4 });
|
||||
const { id: dealerId } = await makeTestSimpleAccount(source, {
|
||||
company_name: 'DEALER_COMPANY',
|
||||
tier: 4,
|
||||
});
|
||||
const { id: dealerAdminId } = await makeTestUser(source, {
|
||||
account_id: dealerId,
|
||||
external_id: 'userId_admin',
|
||||
@ -682,7 +692,7 @@ describe('ライセンス割り当て', () => {
|
||||
|
||||
const { id: accountId } = await makeTestSimpleAccount(source, {
|
||||
parent_account_id: dealerId,
|
||||
tier: 5
|
||||
tier: 5,
|
||||
});
|
||||
const { id: userId } = await makeTestUser(source, {
|
||||
account_id: accountId,
|
||||
@ -740,7 +750,7 @@ describe('ライセンス割り当て', () => {
|
||||
},
|
||||
],
|
||||
}));
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
overrideSendgridService(service, {
|
||||
|
||||
@ -11,6 +11,7 @@ import { makeErrorResponse } from '../../common/error/makeErrorResponse';
|
||||
import { TasksService } from './tasks.service';
|
||||
import { DataSource } from 'typeorm';
|
||||
import {
|
||||
createAudioFile,
|
||||
createCheckoutPermissions,
|
||||
createTask,
|
||||
createUserGroup,
|
||||
@ -707,6 +708,19 @@ describe('TasksService', () => {
|
||||
role: 'author',
|
||||
author_id: 'MY_AUTHOR_ID',
|
||||
});
|
||||
|
||||
//「バグ 3661: [FB対応]Option Itemにチェックを付けると真っ白な画面になる」の確認のため
|
||||
// audio_file_idをTaskIdと異なる値にするために、AudioFileを作成
|
||||
await createAudioFile(
|
||||
source,
|
||||
accountId,
|
||||
userId,
|
||||
'MY_AUTHOR_ID',
|
||||
'',
|
||||
'00',
|
||||
);
|
||||
|
||||
// Taskを作成
|
||||
await createTask(
|
||||
source,
|
||||
accountId,
|
||||
@ -750,10 +764,26 @@ describe('TasksService', () => {
|
||||
{
|
||||
const task = tasks[0];
|
||||
expect(task.jobNumber).toEqual('00000001');
|
||||
// AudioOptionItem
|
||||
const audioOptionItems = Array.from({ length: 10 }).map((_, i) => {
|
||||
return {
|
||||
optionItemLabel: `label${i}:audio_file_id${task.audioFileId}`,
|
||||
optionItemValue: `value${i}:audio_file_id${task.audioFileId}`,
|
||||
};
|
||||
});
|
||||
expect(task.optionItemList).toEqual(audioOptionItems);
|
||||
}
|
||||
{
|
||||
const task = tasks[1];
|
||||
expect(task.jobNumber).toEqual('00000002');
|
||||
// AudioOptionItem
|
||||
const audioOptionItems = Array.from({ length: 10 }).map((_, i) => {
|
||||
return {
|
||||
optionItemLabel: `label${i}:audio_file_id${task.audioFileId}`,
|
||||
optionItemValue: `value${i}:audio_file_id${task.audioFileId}`,
|
||||
};
|
||||
});
|
||||
expect(task.optionItemList).toEqual(audioOptionItems);
|
||||
}
|
||||
});
|
||||
it('[Author] Authorは同一アカウントであっても自分以外のAuhtorのTaskは取得できない', async () => {
|
||||
|
||||
@ -131,6 +131,17 @@ export const createTask = async (
|
||||
audio_format: 'audio_format',
|
||||
is_encrypted: true,
|
||||
});
|
||||
// AudioOptionItemを10個作成
|
||||
const audioOptionItems = Array.from({ length: 10 }).map((_, i) => {
|
||||
return {
|
||||
audio_file_id: audioFileIdentifiers[0].id,
|
||||
label: `label${i}:audio_file_id${audioFileIdentifiers[0].id}`,
|
||||
value: `value${i}:audio_file_id${audioFileIdentifiers[0].id}`,
|
||||
};
|
||||
});
|
||||
|
||||
await datasource.getRepository(AudioOptionItem).insert(audioOptionItems);
|
||||
|
||||
const audioFile = audioFileIdentifiers.pop() as AudioFile;
|
||||
const { identifiers: taskIdentifiers } = await datasource
|
||||
.getRepository(Task)
|
||||
@ -202,6 +213,37 @@ export const createTask = async (
|
||||
|
||||
return { taskId: task.id, audioFileId: audioFile.id };
|
||||
};
|
||||
|
||||
export const createAudioFile = async (
|
||||
datasource: DataSource,
|
||||
account_id: number,
|
||||
owner_user_id: number,
|
||||
author_id: string,
|
||||
work_type_id: string,
|
||||
priority: string,
|
||||
): Promise<{ audioFileId: number }> => {
|
||||
const { identifiers: audioFileIdentifiers } = await datasource
|
||||
.getRepository(AudioFile)
|
||||
.insert({
|
||||
account_id: account_id,
|
||||
owner_user_id: owner_user_id,
|
||||
url: '',
|
||||
file_name: 'x.zip',
|
||||
author_id: author_id,
|
||||
work_type_id: work_type_id,
|
||||
started_at: new Date(),
|
||||
duration: '100000',
|
||||
finished_at: new Date(),
|
||||
uploaded_at: new Date(),
|
||||
file_size: 10000,
|
||||
priority: priority,
|
||||
audio_format: 'audio_format',
|
||||
is_encrypted: true,
|
||||
});
|
||||
const audioFile = audioFileIdentifiers.pop() as AudioFile;
|
||||
return { audioFileId: audioFile.id };
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param datasource
|
||||
|
||||
@ -17,7 +17,6 @@ export class GetTemplatesResponse {
|
||||
templates: TemplateFile[];
|
||||
}
|
||||
|
||||
|
||||
export class DeleteTemplateRequestParam {
|
||||
@ApiProperty()
|
||||
@Type(() => Number)
|
||||
|
||||
@ -18,6 +18,6 @@ export class AudioOptionItem {
|
||||
@Column()
|
||||
value: string;
|
||||
@ManyToOne(() => Task, (task) => task.audio_file_id)
|
||||
@JoinColumn({ name: 'audio_file_id' })
|
||||
@JoinColumn({ name: 'audio_file_id', referencedColumnName: 'audio_file_id' })
|
||||
task: Task | null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user