-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…tor-page Feature/#548 new email editor page
- Loading branch information
Showing
22 changed files
with
831 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const createCRUDController = require('@/controllers/middlewaresControllers/createCRUDController'); | ||
const crudController = createCRUDController('Email'); | ||
|
||
const emailMethods = { | ||
create:crudController.create, | ||
read: crudController.read, | ||
update: crudController.update, | ||
list: crudController.list, | ||
listAll: crudController.listAll, | ||
filter: crudController.filter, | ||
search: crudController.search, | ||
}; | ||
|
||
module.exports = emailMethods; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
46 changes: 46 additions & 0 deletions
46
frontend/src/modules/EmailModule/EmailDataTableModule/components/DataTableDropMenu.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Menu } from 'antd'; | ||
|
||
import { | ||
EyeOutlined, | ||
EditOutlined, | ||
DeleteOutlined, | ||
FilePdfOutlined, | ||
CreditCardOutlined, | ||
} from '@ant-design/icons'; | ||
import { useSelector, useDispatch } from 'react-redux'; | ||
import { erp } from '@/redux/erp/actions'; | ||
import { selectItemById } from '@/redux/erp/selectors'; | ||
import { useErpContext } from '@/context/erp'; | ||
|
||
import { DOWNLOAD_BASE_URL } from '@/config/serverApiConfig'; | ||
import uniqueId from '@/utils/uinqueId'; | ||
import { useHistory } from 'react-router-dom'; | ||
|
||
export default function DataTableDropMenu({ row, entity }) { | ||
const dispatch = useDispatch(); | ||
const history = useHistory(); | ||
const { erpContextAction } = useErpContext(); | ||
const { recordPanel, modal } = erpContextAction; | ||
const item = useSelector(selectItemById(row._id)); | ||
function Read() { | ||
dispatch(erp.currentItem({ data: item })); | ||
// readPanel.open(); | ||
history.push(`/email/read/${row._id}`); | ||
} | ||
|
||
function Edit() { | ||
dispatch(erp.currentAction({ actionType: 'update', data: item })); | ||
// updatePanel.open(); | ||
history.push(`/email/update/${row._id}`); | ||
} | ||
return ( | ||
<Menu style={{ minWidth: 130 }}> | ||
<Menu.Item key={`${uniqueId()}`} icon={<EyeOutlined />} onClick={Read}> | ||
Show | ||
</Menu.Item> | ||
<Menu.Item key={`${uniqueId()}`} icon={<EditOutlined />} onClick={Edit}> | ||
Edit | ||
</Menu.Item> | ||
</Menu> | ||
); | ||
} |
11 changes: 11 additions & 0 deletions
11
frontend/src/modules/EmailModule/EmailDataTableModule/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ErpLayout } from '@/layout'; | ||
import ErpPanel from '@/modules/ErpPanelModule'; | ||
import DataTableDropMenu from './components/DataTableDropMenu'; | ||
|
||
export default function EmailDataTableModule({ config }) { | ||
return ( | ||
<ErpLayout> | ||
<ErpPanel config={config} DataTableDropMenu={DataTableDropMenu}></ErpPanel> | ||
</ErpLayout> | ||
); | ||
} |
Oops, something went wrong.