Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f94f8a113 | |||
| 19f39a201e | |||
| 276dee1f50 | |||
| 5f9caf11ad | |||
| 609bb528ec |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-e2e-testing",
|
||||
"version": "0.50.0-canary",
|
||||
"version": "0.50.1",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-emails",
|
||||
"version": "0.50.0-canary",
|
||||
"version": "0.50.2",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-front",
|
||||
"version": "0.50.0-canary",
|
||||
"version": "0.50.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
+5
-16
@@ -38,6 +38,7 @@ const StyledLabelAndIconContainer = styled.div`
|
||||
display: flex;
|
||||
gap: ${({ theme }) => theme.spacing(1)};
|
||||
height: 18px;
|
||||
padding-top: 3px;
|
||||
`;
|
||||
|
||||
const StyledValueContainer = styled.div`
|
||||
@@ -53,16 +54,11 @@ const StyledLabelContainer = styled.div<{ width?: number }>`
|
||||
width: ${({ width }) => width}px;
|
||||
`;
|
||||
|
||||
const StyledInlineCellBaseContainer = styled.div<{
|
||||
isDisplayModeFixHeight?: boolean;
|
||||
}>`
|
||||
const StyledInlineCellBaseContainer = styled.div`
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
line-height: ${({ isDisplayModeFixHeight }) =>
|
||||
isDisplayModeFixHeight ? `24px` : `18px`};
|
||||
height: ${({ isDisplayModeFixHeight }) =>
|
||||
isDisplayModeFixHeight ? `24px` : `18px`};
|
||||
height: fit-content;
|
||||
gap: ${({ theme }) => theme.spacing(1)};
|
||||
user-select: none;
|
||||
align-items: center;
|
||||
@@ -74,14 +70,8 @@ export const StyledSkeletonDiv = styled.div`
|
||||
`;
|
||||
|
||||
export const RecordInlineCellContainer = () => {
|
||||
const {
|
||||
readonly,
|
||||
IconLabel,
|
||||
label,
|
||||
labelWidth,
|
||||
showLabel,
|
||||
isDisplayModeFixHeight,
|
||||
} = useRecordInlineCellContext();
|
||||
const { readonly, IconLabel, label, labelWidth, showLabel } =
|
||||
useRecordInlineCellContext();
|
||||
|
||||
const { recordId, fieldDefinition } = useContext(FieldContext);
|
||||
|
||||
@@ -111,7 +101,6 @@ export const RecordInlineCellContainer = () => {
|
||||
|
||||
return (
|
||||
<StyledInlineCellBaseContainer
|
||||
isDisplayModeFixHeight={isDisplayModeFixHeight}
|
||||
onMouseEnter={handleContainerMouseEnter}
|
||||
onMouseLeave={handleContainerMouseLeave}
|
||||
>
|
||||
|
||||
+2
@@ -44,6 +44,8 @@ const StyledRecordInlineCellNormalModeInnerContainer = styled.div`
|
||||
align-items: center;
|
||||
color: ${({ theme }) => theme.font.color.primary};
|
||||
height: fit-content;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-server",
|
||||
"version": "0.50.0-canary",
|
||||
"version": "0.50.2",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
+18
-1
@@ -75,7 +75,12 @@ export class BeforeUpdateOneField<T extends UpdateFieldInput>
|
||||
locale?: keyof typeof APP_LOCALES,
|
||||
): UpdateOneInputType<T> {
|
||||
const update: StandardFieldUpdate = {};
|
||||
const updatableFields = ['isActive', 'isLabelSyncedWithName', 'options'];
|
||||
const updatableFields = [
|
||||
'isActive',
|
||||
'isLabelSyncedWithName',
|
||||
'options',
|
||||
'settings',
|
||||
];
|
||||
const overridableFields = ['label', 'icon', 'description'];
|
||||
|
||||
const nonUpdatableFields = Object.keys(instance.update).filter(
|
||||
@@ -110,6 +115,7 @@ export class BeforeUpdateOneField<T extends UpdateFieldInput>
|
||||
this.handleLabelSyncedWithNameField(instance, update);
|
||||
this.handleStandardOverrides(instance, fieldMetadata, update, locale);
|
||||
this.handleOptionsField(instance, update);
|
||||
this.handleSettingsField(instance, update);
|
||||
|
||||
return {
|
||||
id: instance.id,
|
||||
@@ -128,6 +134,17 @@ export class BeforeUpdateOneField<T extends UpdateFieldInput>
|
||||
update.options = instance.update.options;
|
||||
}
|
||||
|
||||
private handleSettingsField(
|
||||
instance: UpdateOneInputType<T>,
|
||||
update: StandardFieldUpdate,
|
||||
): void {
|
||||
if (!isDefined(instance.update.settings)) {
|
||||
return;
|
||||
}
|
||||
|
||||
update.settings = instance.update.settings;
|
||||
}
|
||||
|
||||
private handleActiveField(
|
||||
instance: UpdateOneInputType<T>,
|
||||
update: StandardFieldUpdate,
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class MicrosoftImportDriverException extends CustomException {
|
||||
statusCode: number;
|
||||
constructor(message: string, code: string, statusCode: number) {
|
||||
super(message, code);
|
||||
this.statusCode = statusCode;
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -80,7 +80,7 @@ export class MicrosoftGetMessagesService {
|
||||
|
||||
const messages = parsedResponses.map((response) => {
|
||||
if ('error' in response) {
|
||||
this.microsoftHandleErrorService.handleMicrosoftMessageFetchError(
|
||||
this.microsoftHandleErrorService.throwMicrosoftBatchError(
|
||||
response.error,
|
||||
);
|
||||
}
|
||||
|
||||
+16
@@ -4,6 +4,7 @@ import {
|
||||
MessageImportDriverException,
|
||||
MessageImportDriverExceptionCode,
|
||||
} from 'src/modules/messaging/message-import-manager/drivers/exceptions/message-import-driver.exception';
|
||||
import { MicrosoftImportDriverException } from 'src/modules/messaging/message-import-manager/drivers/microsoft/exceptions/microsoft-import-driver.exception';
|
||||
|
||||
@Injectable()
|
||||
export class MicrosoftHandleErrorService {
|
||||
@@ -29,9 +30,24 @@ export class MicrosoftHandleErrorService {
|
||||
);
|
||||
}
|
||||
|
||||
if (error.statusCode === 429) {
|
||||
throw new MessageImportDriverException(
|
||||
`Microsoft Graph API ${error.code} ${error.statusCode} error: ${error.message}`,
|
||||
MessageImportDriverExceptionCode.TEMPORARY_ERROR,
|
||||
);
|
||||
}
|
||||
|
||||
throw new MessageImportDriverException(
|
||||
`Microsoft driver error: ${error.message}`,
|
||||
MessageImportDriverExceptionCode.UNKNOWN,
|
||||
);
|
||||
}
|
||||
|
||||
public throwMicrosoftBatchError(error: any): void {
|
||||
throw new MicrosoftImportDriverException(
|
||||
error.message,
|
||||
error.code,
|
||||
error.statusCode,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-4
@@ -18,7 +18,8 @@ export enum MessageImportSyncStep {
|
||||
FULL_MESSAGE_LIST_FETCH = 'FULL_MESSAGE_LIST_FETCH',
|
||||
PARTIAL_MESSAGE_LIST_FETCH = 'PARTIAL_MESSAGE_LIST_FETCH',
|
||||
FULL_OR_PARTIAL_MESSAGE_LIST_FETCH = 'FULL_OR_PARTIAL_MESSAGE_LIST_FETCH',
|
||||
MESSAGES_IMPORT = 'MESSAGES_IMPORT',
|
||||
MESSAGES_IMPORT_PENDING = 'MESSAGES_IMPORT_PENDING',
|
||||
MESSAGES_IMPORT_ONGOING = 'MESSAGES_IMPORT_ONGOING',
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@@ -94,7 +95,7 @@ export class MessageImportExceptionHandlerService {
|
||||
workspaceId,
|
||||
);
|
||||
throw new MessageImportException(
|
||||
`Unknown error occurred multiple times while importing messages for message channel ${messageChannel.id} in workspace ${workspaceId}`,
|
||||
`Unknown temporary error occurred multiple times while importing messages for message channel ${messageChannel.id} in workspace ${workspaceId}`,
|
||||
MessageImportExceptionCode.UNKNOWN,
|
||||
);
|
||||
}
|
||||
@@ -122,8 +123,8 @@ export class MessageImportExceptionHandlerService {
|
||||
[messageChannel.id],
|
||||
);
|
||||
break;
|
||||
|
||||
case MessageImportSyncStep.MESSAGES_IMPORT:
|
||||
case MessageImportSyncStep.MESSAGES_IMPORT_PENDING:
|
||||
case MessageImportSyncStep.MESSAGES_IMPORT_ONGOING:
|
||||
await this.messageChannelSyncStatusService.scheduleMessagesImport([
|
||||
messageChannel.id,
|
||||
]);
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ export class MessagingMessagesImportService {
|
||||
|
||||
await this.messageImportErrorHandlerService.handleDriverException(
|
||||
error,
|
||||
MessageImportSyncStep.MESSAGES_IMPORT,
|
||||
MessageImportSyncStep.MESSAGES_IMPORT_ONGOING,
|
||||
messageChannel,
|
||||
workspaceId,
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-shared",
|
||||
"version": "0.50.0-canary",
|
||||
"version": "0.50.2",
|
||||
"main": "dist/twenty-shared.cjs.js",
|
||||
"module": "dist/twenty-shared.esm.js",
|
||||
"license": "AGPL-3.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-ui",
|
||||
"version": "0.50.0-canary",
|
||||
"version": "0.50.2",
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twenty-website",
|
||||
"version": "0.50.0-canary",
|
||||
"version": "0.50.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"nx": "NX_DEFAULT_PROJECT=twenty-website node ../../node_modules/nx/bin/nx.js",
|
||||
|
||||
Reference in New Issue
Block a user