Skip to content

Commit

Permalink
Merge branch 'devel' into IRIS-3740-focus-background-not-applied-on-list
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliano176 committed Feb 15, 2023
2 parents 34a0aab + 90d5e7a commit d7d2b72
Show file tree
Hide file tree
Showing 36 changed files with 270 additions and 825 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Zextras/the-dexters
* @Zextras/crabonions
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.1.2](https://github.com/zextras/carbonio-mails-ui/compare/v1.1.1...v1.1.2) (2023-02-10)


### Bug Fixes

* handle errors during message sending ([95ddeea](https://github.com/zextras/carbonio-mails-ui/commit/95ddeeae9df8662c9c7fff4b80cea8c9f6bf06e3))

### [1.1.1](https://github.com/zextras/carbonio-mails-ui/compare/v1.1.0...v1.1.1) (2023-02-10)


### Bug Fixes

* default identity selection where replying ([98c6745](https://github.com/zextras/carbonio-mails-ui/commit/98c67456890bd1c648516c4a5a0393558713ecf9))

## [1.1.0](https://github.com/zextras/carbonio-mails-ui/compare/v1.0.0...v1.1.0) (2023-02-02)


Expand Down
372 changes: 186 additions & 186 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "carbonio-mails-ui",
"version": "1.1.0",
"version": "1.1.2",
"description": "Mails module for Zextras Carbonio",
"main": "src/app.jsx",
"scripts": {
Expand Down
8 changes: 0 additions & 8 deletions src/commons/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ export enum ActionsType {
PREFILL_COMPOSE = 'prefillCompose'
}

// eslint-disable-next-line no-shadow
export enum TagsActionsType {
NEW = 'new',
DELETE = 'delete',
EDIT = 'edit',
Apply = 'apply'
}

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const omitBy = (obj: any, check: (arg: unknown) => boolean): any => {
// eslint-disable-next-line no-param-reassign
Expand Down
15 changes: 0 additions & 15 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,3 @@ export const emailStatusItemsConstant = (t: TFunction): Array<EmailStatusItemsCo
];

export const MAIL_APP_ID = 'carbonio-mails-ui';

export const FOLDER_VIEW = {
search_folder: 'search folder',
tag: 'tag',
conversation: 'conversation',
message: 'message',
contact: 'contact',
document: 'document',
appointment: 'appointment',
virtual_conversation: 'virtual conversation',
remote_folder: 'remote folder',
wiki: 'wiki',
task: 'task',
chat: 'chat'
};
3 changes: 2 additions & 1 deletion src/hooks/use-get-tags-accordions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import {
ModalManagerContext
} from '@zextras/carbonio-design-system';
import { reduce } from 'lodash';
import { TagsAccordionItems } from '../carbonio-ui-commons/types/tags';
import { createTag, useGetTagsActions } from '../ui-actions/tag-actions';
import { ItemType, TagsAccordionItems } from '../types';
import { ItemType } from '../types';

type ItemProps = {
item: ItemType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { useFoldersByView, useUserAccounts } from '@zextras/carbonio-shell-ui';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { find } from 'lodash';
import { FOLDER_VIEW } from '../../../carbonio-ui-commons/constants';
import ColorSelect from './color-select';
import { ResponseActionsProps } from '../../../types';
import { accept, decline } from './share-calendar-actions';
import { FOLDER_VIEW } from '../../../constants';

const ResponseActions: FC<ResponseActionsProps> = ({
dispatch,
Expand Down
18 changes: 12 additions & 6 deletions src/store/actions/send-msg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getMsg } from './get-msg';

export const sendMsg = createAsyncThunk<any, SendMsgParameters>(
'sendMsg',
async ({ editorId, msg, prefs }, { getState, dispatch }) => {
async ({ editorId, msg, prefs }, { rejectWithValue, getState, dispatch }) => {
const editor = (getState() as StateType).editors.editors[editorId];
let toSend = editor && generateRequest(editor, prefs);

Expand All @@ -28,15 +28,21 @@ export const sendMsg = createAsyncThunk<any, SendMsgParameters>(
})) as SaveDraftResponse;
} catch (e) {
console.error(e);
return rejectWithValue(e);
}

if (resp?.m && resp?.m[0]?.id) {
dispatch(getMsg({ msgId: resp.m[0].id }));
const response = resp?.Fault ? { ...resp.Fault, error: true } : resp;
if (response?.error) {
return rejectWithValue(response);
}

if (response?.m && response?.m[0]?.id) {
dispatch(getMsg({ msgId: response.m[0].id }));
dispatch(closeEditor(editorId));
}
if (resp?.m && resp?.m[0]?.cid) {
dispatch(getConv({ conversationId: resp.m[0].cid }));
if (response?.m && response?.m[0]?.cid) {
dispatch(getConv({ conversationId: response.m[0].cid }));
}
return { resp, editor };
return { response, editor };
}
);
6 changes: 5 additions & 1 deletion src/store/sync/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
find,
reject
} from 'lodash';
import { MAILS_ROUTE } from '../../constants';
import { normalizeMailMessageFromSoap } from '../../normalizations/normalize-message';
import { SoapIncompleteMessage, MsgStateType, IncompleteMessage, Payload } from '../../types';

Expand Down Expand Up @@ -71,7 +72,10 @@ const triggerNotification = (m: Array<SoapIncompleteMessage>): void => {
showPopup: isShowNotificationEnabled === 'TRUE',
onClick: (): void => {
window.focus();
replaceHistory(`/folder/${msg.parent}/message/${msg.id}`);
replaceHistory({
path: `/folder/${msg.parent}/message/${msg.id}`,
route: MAILS_ROUTE
});
}
}));

Expand Down
Loading

0 comments on commit d7d2b72

Please sign in to comment.