snapshot of https://github.com/RocketChat/Rocket.Chat.git (develop, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s
This commit is contained in:
46
apps/meteor/client/views/audit/components/tabs/DirectTab.tsx
Normal file
46
apps/meteor/client/views/audit/components/tabs/DirectTab.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import { Field, FieldLabel, FieldRow, FieldError } from '@rocket.chat/fuselage';
|
||||
import type { UseFormReturn } from 'react-hook-form';
|
||||
import { useController } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import UserAutoCompleteMultiple from '../../../../components/UserAutoCompleteMultiple';
|
||||
import type { AuditFields } from '../../hooks/useAuditForm';
|
||||
|
||||
export type DirectTabProps = {
|
||||
form: UseFormReturn<AuditFields>;
|
||||
};
|
||||
|
||||
const DirectTab = ({ form: { control } }: DirectTabProps) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { field: usersField, fieldState: usersFieldState } = useController({
|
||||
name: 'users',
|
||||
control,
|
||||
rules: {
|
||||
required: true,
|
||||
validate: (value) => {
|
||||
if (value.length < 2) {
|
||||
return t('Select_at_least_two_users');
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<Field flexShrink={1}>
|
||||
<FieldLabel>{t('Users')}</FieldLabel>
|
||||
<FieldRow>
|
||||
<UserAutoCompleteMultiple
|
||||
value={usersField.value}
|
||||
error={usersFieldState.error?.message}
|
||||
onChange={usersField.onChange}
|
||||
placeholder={t('Username_Placeholder')}
|
||||
/>
|
||||
</FieldRow>
|
||||
{usersFieldState.error?.type === 'required' && <FieldError>{t('Required_field', { field: t('Users') })}</FieldError>}
|
||||
{usersFieldState.error?.type === 'validate' && <FieldError>{usersFieldState.error.message}</FieldError>}
|
||||
</Field>
|
||||
);
|
||||
};
|
||||
|
||||
export default DirectTab;
|
||||
@@ -0,0 +1,66 @@
|
||||
import { Field, FieldLabel, FieldRow, FieldError } from '@rocket.chat/fuselage';
|
||||
import type { UseFormReturn } from 'react-hook-form';
|
||||
import { useController } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import AutoCompleteAgent from '../../../omnichannel/components/AutoCompleteAgent';
|
||||
import type { AuditFields } from '../../hooks/useAuditForm';
|
||||
import VisitorAutoComplete from '../forms/VisitorAutoComplete';
|
||||
|
||||
export type OmnichannelTabProps = {
|
||||
form: UseFormReturn<AuditFields>;
|
||||
};
|
||||
|
||||
const OmnichannelTab = ({ form: { control } }: OmnichannelTabProps) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { field: visitorField, fieldState: visitorFieldState } = useController({
|
||||
name: 'visitor',
|
||||
control,
|
||||
rules: { required: true },
|
||||
});
|
||||
const { field: agentField, fieldState: agentFieldState } = useController({
|
||||
name: 'agent',
|
||||
control,
|
||||
rules: { required: true },
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<Field flexShrink={1}>
|
||||
<FieldLabel flexGrow={0}>{t('Visitor')}</FieldLabel>
|
||||
<FieldRow>
|
||||
<VisitorAutoComplete
|
||||
value={visitorField.value}
|
||||
error={!!visitorFieldState.error}
|
||||
onChange={visitorField.onChange}
|
||||
placeholder={t('Username_Placeholder')}
|
||||
/>
|
||||
</FieldRow>
|
||||
{visitorFieldState.error?.type === 'required' && <FieldError>{t('Required_field', { field: t('Visitor') })}</FieldError>}
|
||||
{visitorFieldState.error?.type === 'validate' && <FieldError>{visitorFieldState.error.message}</FieldError>}
|
||||
</Field>
|
||||
<Field flexShrink={1} marginInlineStart={8}>
|
||||
<FieldLabel flexGrow={0}>{t('Agent')}</FieldLabel>
|
||||
<FieldRow>
|
||||
<AutoCompleteAgent
|
||||
error={(() => {
|
||||
if (agentFieldState.error?.type === 'required') {
|
||||
return t('Required_field', { field: t('Agent') });
|
||||
}
|
||||
|
||||
return agentFieldState.error?.message;
|
||||
})()}
|
||||
value={agentField.value}
|
||||
onChange={agentField.onChange}
|
||||
placeholder={t('Username_Placeholder')}
|
||||
/>
|
||||
</FieldRow>
|
||||
{agentFieldState.error?.type === 'required' && <FieldError>{t('Required_field', { field: t('Agent') })}</FieldError>}
|
||||
{agentFieldState.error?.type === 'validate' && <FieldError>{agentFieldState.error.message}</FieldError>}
|
||||
</Field>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default OmnichannelTab;
|
||||
43
apps/meteor/client/views/audit/components/tabs/RoomsTab.tsx
Normal file
43
apps/meteor/client/views/audit/components/tabs/RoomsTab.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { IRoom } from '@rocket.chat/core-typings';
|
||||
import { Field, FieldLabel, FieldRow, FieldError, Icon } from '@rocket.chat/fuselage';
|
||||
import type { Dispatch, SetStateAction } from 'react';
|
||||
import type { UseFormReturn } from 'react-hook-form';
|
||||
import { useController } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import RoomAutoComplete from '../../../../components/RoomAutoComplete';
|
||||
import type { AuditFields } from '../../hooks/useAuditForm';
|
||||
|
||||
export type RoomsTabProps = {
|
||||
form: UseFormReturn<AuditFields>;
|
||||
setSelectedRoom: Dispatch<SetStateAction<IRoom | undefined>>;
|
||||
};
|
||||
|
||||
const RoomsTab = ({ form: { control }, setSelectedRoom }: RoomsTabProps) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { field: ridField, fieldState: ridFieldState } = useController({ name: 'rid', control, rules: { required: true } });
|
||||
|
||||
return (
|
||||
<Field flexShrink={1}>
|
||||
<FieldLabel>{t('Channel_name')}</FieldLabel>
|
||||
<FieldRow>
|
||||
<RoomAutoComplete
|
||||
scope='admin'
|
||||
setSelectedRoom={setSelectedRoom}
|
||||
value={ridField.value}
|
||||
error={!!ridFieldState.error}
|
||||
placeholder={t('Channel_Name_Placeholder')}
|
||||
onChange={ridField.onChange}
|
||||
renderRoomIcon={({ encrypted }) =>
|
||||
encrypted ? <Icon name='key' color='danger' title={t('Encrypted_content_will_not_appear_search')} /> : null
|
||||
}
|
||||
/>
|
||||
</FieldRow>
|
||||
{ridFieldState.error?.type === 'required' && <FieldError>{t('Required_field', { field: t('Channel_name') })}</FieldError>}
|
||||
{ridFieldState.error?.type === 'validate' && <FieldError>{ridFieldState.error.message}</FieldError>}
|
||||
</Field>
|
||||
);
|
||||
};
|
||||
|
||||
export default RoomsTab;
|
||||
46
apps/meteor/client/views/audit/components/tabs/UsersTab.tsx
Normal file
46
apps/meteor/client/views/audit/components/tabs/UsersTab.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import { Field, FieldLabel, FieldRow, FieldError } from '@rocket.chat/fuselage';
|
||||
import type { UseFormReturn } from 'react-hook-form';
|
||||
import { useController } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import UserAutoCompleteMultiple from '../../../../components/UserAutoCompleteMultiple';
|
||||
import type { AuditFields } from '../../hooks/useAuditForm';
|
||||
|
||||
export type UsersTabProps = {
|
||||
form: UseFormReturn<AuditFields>;
|
||||
};
|
||||
|
||||
const UsersTab = ({ form: { control } }: UsersTabProps) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { field: usersField, fieldState: usersFieldState } = useController({
|
||||
name: 'users',
|
||||
control,
|
||||
rules: {
|
||||
required: true,
|
||||
validate: (value) => {
|
||||
if (value.length < 1) {
|
||||
return t('Required_field', { field: t('Users') });
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<Field flexShrink={1}>
|
||||
<FieldLabel>{t('Users')}</FieldLabel>
|
||||
<FieldRow>
|
||||
<UserAutoCompleteMultiple
|
||||
error={usersFieldState.error?.message}
|
||||
value={usersField.value}
|
||||
onChange={usersField.onChange}
|
||||
placeholder={t('Username_Placeholder')}
|
||||
/>
|
||||
</FieldRow>
|
||||
{usersFieldState.error?.type === 'required' && <FieldError>{t('Required_field', { field: t('Users') })}</FieldError>}
|
||||
{usersFieldState.error?.type === 'validate' && <FieldError>{usersFieldState.error.message}</FieldError>}
|
||||
</Field>
|
||||
);
|
||||
};
|
||||
|
||||
export default UsersTab;
|
||||
Reference in New Issue
Block a user