Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module.exports = {
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: true,
bracketSameLine: true,
arrowParens: 'always',
requirePragma: false,
insertPragma: false,
proseWrap: 'always',
endOfLine:"auto",
endOfLine: 'auto',
};
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
- "5001:5000"
volumes:
- ./:/ng-app
- node_modules_data:/ng-app/node_modules
networks:
- forus-network

Expand All @@ -32,4 +33,8 @@ services:
networks:
forus-network:
name: forus-network
driver: bridge
driver: bridge

volumes:
node_modules_data:
driver: local
367 changes: 172 additions & 195 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
Expand Up @@ -92,7 +92,7 @@
"@mdi/js": "^7.1.96",
"@react-google-maps/api": "^2.20.3",
"@uiw/react-color": "^2.4.1",
"aws-rum-web": "^1.19.0",
"aws-rum-web": "^2.0.0",
"chart.js": "^4.4.1",
"clean-webpack-plugin": "^4.0.0",
"date-fns": "^4.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
}
}

&.bottom {
&.block-card-actions-bottom {
width: 100%;
padding: 8px 65px 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@
}
}

&.reimbursement-image-rejected {
&.reimbursement-image-declined {
svg .fill-color-primary {
fill: #d38c87;
}
}

&.reimbursement-image-accepted {
&.reimbursement-image-approved {
svg .fill-color-primary {
fill: #9bbfa1;
}
Expand Down Expand Up @@ -119,7 +119,7 @@
}

.reimbursement-values {
padding: 0px 15px 15px 20px;
padding: 0 15px 15px 20px;
display: flex;
flex-direction: row;
justify-content: flex-end;
Expand Down Expand Up @@ -161,8 +161,6 @@
flex-direction: column;
padding: 15px;
position: relative;
display: flex;
flex-direction: column;
justify-content: flex-end;
white-space: nowrap;

Expand All @@ -184,7 +182,6 @@
bottom: 25px;
left: 25px;
text-align: right;
flex-direction: column;
justify-content: flex-end;
margin: 0 0 5px;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ import TableRowActions from '../tables/TableRowActions';
import ModalLogEmailShow from '../../modals/ModalLogEmailShow';
import { ApiResponse, PaginationData } from '../../../props/ApiResponses';
import usePushApiError from '../../../hooks/usePushApiError';
import Paginator from '../../../modules/paginator/components/Paginator';
import { trimStart } from 'lodash';
import { extractText } from '../../../helpers/utils';
import useFilterNext from '../../../modules/filter_next/useFilterNext';
import useEmailLogService from '../../../services/EmailLogService';
import { useFileService } from '../../../services/FileService';
import Organization from '../../../props/models/Organization';
import useConfigurableTable from '../../pages/vouchers/hooks/useConfigurableTable';
import TableTopScroller from '../tables/TableTopScroller';
import { FilterModel } from '../../../modules/filter_next/types/FilterParams';
import FormGroup from '../forms/elements/FormGroup';

Expand Down Expand Up @@ -56,8 +53,6 @@ export default function BlockCardEmails({
per_page: paginatorService.getPerPage(paginatorKey),
});

const { headElement, configsElement } = useConfigurableTable(emailLogService.getColumns());

const exportEmailLog = useCallback(
(emailLog: EmailLog) => {
emailLogService
Expand Down Expand Up @@ -135,92 +130,66 @@ export default function BlockCardEmails({
</div>
</div>
</div>
<LoaderTableCard empty={!emailLogs.meta.total} emptyTitle={'De lijst van berichten is leeg'}>
<div className="card-section">
<div className="card-block card-block-table">
{configsElement}

<TableTopScroller>
<table className="table">
{headElement}

<tbody>
{emailLogs?.data.map((emailLog) => (
<tr key={emailLog.id} data-dusk={`emailLogRow${emailLog.id}`}>
<td className="nowrap">
<TableDateTime value={emailLog.created_at_locale} />
</td>
<td>
<div className={'text-semibold'}>{emailLog.subject}</div>
<div className={'text-md ellipsis'}>
{strLimit(
trimStart(
extractText(emailLog.content).trim(),
emailLog.subject,
).trim(),
64,
)}
</div>
</td>
<td>
<div className={'text-primary text-semibold'}>
{emailLog.to_address || <TableEmptyValue />}
</div>
<div>{emailLog.to_name || <TableEmptyValue />}</div>
</td>
<td>
<div className={'text-primary text-semibold'}>
{emailLog.from_address || <TableEmptyValue />}
</div>
<div>{emailLog.from_name || <TableEmptyValue />}</div>
</td>
<td className={'text-right'}>
<TableRowActions
dataDusk={`btnEmailLogMenu${emailLog.id}`}
content={({ close }) => (
<div className="dropdown dropdown-actions">
<a
className={'dropdown-item'}
data-dusk="openEmail"
onClick={() => {
openEmail(emailLog);
close();
}}>
<em className="mdi mdi-eye icon-start" />
Bekijken
</a>
<a
className={'dropdown-item'}
data-dusk="exportEmail"
onClick={() => {
exportEmailLog(emailLog);
close();
}}>
<em className="mdi mdi-content-save-outline icon-start" />
Download
</a>
</div>
)}
/>
</td>
</tr>
))}
</tbody>
</table>
</TableTopScroller>
</div>
</div>

{emailLogs?.meta && (
<div className="card-section">
<Paginator
meta={emailLogs.meta}
filters={filterValues}
updateFilters={filterUpdate}
perPageKey={paginatorKey}
/>
</div>
)}
<LoaderTableCard
empty={!emailLogs?.meta?.total}
emptyTitle={'De lijst van berichten is leeg'}
columns={emailLogService.getColumns()}
paginator={{ key: paginatorKey, data: emailLogs, filterValues, filterUpdate }}>
{emailLogs?.data?.map((emailLog) => (
<tr key={emailLog.id} data-dusk={`emailLogRow${emailLog.id}`}>
<td className="nowrap">
<TableDateTime value={emailLog.created_at_locale} />
</td>
<td>
<div className={'text-semibold'}>{emailLog.subject}</div>
<div className={'text-md ellipsis'}>
{strLimit(trimStart(extractText(emailLog.content).trim(), emailLog.subject).trim(), 64)}
</div>
</td>
<td>
<div className={'text-primary text-semibold'}>
{emailLog.to_address || <TableEmptyValue />}
</div>
<div>{emailLog.to_name || <TableEmptyValue />}</div>
</td>
<td>
<div className={'text-primary text-semibold'}>
{emailLog.from_address || <TableEmptyValue />}
</div>
<div>{emailLog.from_name || <TableEmptyValue />}</div>
</td>
<td className={'text-right'}>
<TableRowActions
dataDusk={`btnEmailLogMenu${emailLog.id}`}
content={({ close }) => (
<div className="dropdown dropdown-actions">
<a
className={'dropdown-item'}
data-dusk="openEmail"
onClick={() => {
openEmail(emailLog);
close();
}}>
<em className="mdi mdi-eye icon-start" />
Bekijken
</a>
<a
className={'dropdown-item'}
data-dusk="exportEmail"
onClick={() => {
exportEmailLog(emailLog);
close();
}}>
<em className="mdi mdi-content-save-outline icon-start" />
Download
</a>
</div>
)}
/>
</td>
</tr>
))}
</LoaderTableCard>
</div>
);
Expand Down
Loading