Skip to content

Commit

Permalink
feat: remove attached files feature from core package
Browse files Browse the repository at this point in the history
  • Loading branch information
vhu-axelor committed Dec 13, 2024
1 parent ebfbeac commit b40a5b7
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 441 deletions.
5 changes: 5 additions & 0 deletions changelogs/unreleased/88363.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "Attached files: remove attached files feature from core package",
"type": "feat",
"packages": "core"
}
13 changes: 6 additions & 7 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It contains:
- Auth module with login and user screens
- Translations management system
- Various helper tools : clipboard, file viewer, external app management
- Management of MailMessages and attaches files on objects
- Management of MailMessages
- AOS linked components or using external libraries : Camera, Scanner, PlanningView, Stopwatch, ...
- Menu management
- Storage management
Expand Down Expand Up @@ -306,13 +306,13 @@ const Colors = useThemeColor();
)}
```

### Add MailMessages and attached files
### Add MailMessages

- Management of MailMessages and attaches files on objects
- Management of MailMessages on objects

This package provides a component to add MailMessages and file attachments functionality to the header. This component also allows to display its children if there are any as a dropdown menu.
This package provides a component to add MailMessages functionality to the header. This component also allows to display its children if there are any as a dropdown menu.

For the first two functionalities of this component, it is necessary to provide in props the name of the object model ("com.axelor.apps.stock.db.StockCorrection" for the stock corrections for example), the id of the current object, and the navigation attribute to go on the dedicated screens:
For the first functionality of this component, it is necessary to provide in props the name of the object model ("com.axelor.apps.stock.db.StockCorrection" for the stock corrections for example), the id of the current object, and the navigation attribute to go on the dedicated screens:

```typescript
import {HeaderOptionsMenu} from '@axelor/aos-mobile-core';
Expand All @@ -326,8 +326,7 @@ React.useLayoutEffect(() => {
<HeaderOptionsMenu
model={...}
modelId={...}
navigation={navigation}
disableMailMessages={...}>
navigation={navigation}>
<DropdownMenuItem
icon="..."
placeholder={...}
Expand Down
65 changes: 0 additions & 65 deletions packages/core/src/api/attached-files-api.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ const HeaderOptionsMenu = ({
disableMailMessages,
disableJsonFields,
disablePrint,
attachedFileScreenTitle,
barcodeFieldname,
}) => {
const {
mailMessagesAction,
attachedFilesAction,
barcodeAction,
printAction,
jsonFieldsAction,
Expand All @@ -52,7 +50,6 @@ const HeaderOptionsMenu = ({
disablePrint,
barcodeFieldname,
disableJsonFields,
attachedFileScreenTitle,
});

const collapseMenuItems = useMemo(
Expand Down Expand Up @@ -88,7 +85,6 @@ const HeaderOptionsMenu = ({
const allActions = useMemo(
() =>
[
attachedFilesAction,
mailMessagesAction,
printAction,
barcodeAction,
Expand All @@ -100,7 +96,6 @@ const HeaderOptionsMenu = ({
.sort((a, b) => a.order - b.order),
[
actions,
attachedFilesAction,
barcodeAction,
jsonFieldsAction,
mailMessagesAction,
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/src/components/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

export {default as AttachedFilesView} from './AttachedFilesView/AttachedFilesView';
export {default as GlobalToolBox} from './GlobalToolBox/GlobalToolBox';
export {default as MailMessageView} from './MailMessageView/MailMessageView';
export {default as PeriodInput} from './PeriodInput/PeriodInput';
Expand Down
Loading

0 comments on commit b40a5b7

Please sign in to comment.