diff --git a/apps/api/src/app/review/usecases/replace/replace.usecase.ts b/apps/api/src/app/review/usecases/replace/replace.usecase.ts
index fcb894d6..86d6fd97 100644
--- a/apps/api/src/app/review/usecases/replace/replace.usecase.ts
+++ b/apps/api/src/app/review/usecases/replace/replace.usecase.ts
@@ -50,6 +50,7 @@ export class Replace {
{ $eq: ['$' + path, ''] },
{ $regexMatch: { input: { $toString: '$' + path }, regex: /^\s*$/ } },
{ $eq: ['$' + path, null] },
+ { $not: [{ $ifNull: ['$' + path, false] }] },
],
};
replaceOperation = { $literal: formattedReplace };
@@ -146,6 +147,8 @@ export class Replace {
// Add a final stage to remove the temporary _oldRecord field
updateStages.push({ $unset: '_oldRecord' });
+ console.log(updateStages);
+
const result = await recordCollectionModal.updateMany({}, updateStages, { multi: true });
return result;
diff --git a/apps/widget/src/components/Common/Heading/Heading.tsx b/apps/widget/src/components/Common/Heading/Heading.tsx
index 9f0de89e..f1c84b45 100644
--- a/apps/widget/src/components/Common/Heading/Heading.tsx
+++ b/apps/widget/src/components/Common/Heading/Heading.tsx
@@ -1,20 +1,17 @@
import { CloseButton, Group, MediaQuery, Title } from '@mantine/core';
-import { PhasesEnum } from '@types';
+import { FlowsEnum, PhasesEnum } from '@types';
import { Stepper } from '@ui/Stepper';
-import { WIDGET_TEXTS } from '@impler/client';
-import { TemplateModeEnum } from '@impler/shared';
+import { useAppState } from '@store/app.context';
interface IHeadingProps {
title?: string;
active: PhasesEnum;
onClose?: () => void;
- mode?: TemplateModeEnum;
- hasImageUpload?: boolean;
- texts: typeof WIDGET_TEXTS;
}
-export function Heading({ active, title, mode, hasImageUpload, texts, onClose }: IHeadingProps) {
- const manualImportSteps = [
+export function Heading({ active, title, onClose }: IHeadingProps) {
+ const { texts, flow } = useAppState();
+ const straightImportSteps = [
{
label: texts.STEPPER_TITLES.UPLOAD_FILE,
},
@@ -32,6 +29,15 @@ export function Heading({ active, title, mode, hasImageUpload, texts, onClose }:
},
];
+ const manualEntryImportSteps = [
+ {
+ label: texts.STEPPER_TITLES.UPLOAD_FILE,
+ },
+ {
+ label: texts.STEPPER_TITLES.REVIEW_EDIT,
+ },
+ ];
+
const autoImportSteps = [
{
label: texts.STEPPER_TITLES.CONFIGURE_JOB,
@@ -52,18 +58,27 @@ export function Heading({ active, title, mode, hasImageUpload, texts, onClose }:
{title}
diff --git a/apps/widget/src/components/Common/Layout/Layout.tsx b/apps/widget/src/components/Common/Layout/Layout.tsx
index f4664c90..6b0e9176 100644
--- a/apps/widget/src/components/Common/Layout/Layout.tsx
+++ b/apps/widget/src/components/Common/Layout/Layout.tsx
@@ -1,33 +1,21 @@
import { PropsWithChildren } from 'react';
import useStyles from './Styles';
import { PhasesEnum } from '@types';
-import { WIDGET_TEXTS } from '@impler/client';
-import { TemplateModeEnum } from '@impler/shared';
import { Heading } from 'components/Common/Heading';
interface ILayoutProps {
active: PhasesEnum;
title?: string;
onClose?: () => void;
- mode?: TemplateModeEnum;
- hasImageUpload?: boolean;
- texts: typeof WIDGET_TEXTS;
}
export function Layout(props: PropsWithChildren) {
const { classes } = useStyles();
- const { children, active, title, hasImageUpload, mode, texts, onClose } = props;
+ const { children, active, title, onClose } = props;
return (
);
diff --git a/apps/widget/src/components/Common/Table/Table.tsx b/apps/widget/src/components/Common/Table/Table.tsx
index c68e8378..eb783327 100644
--- a/apps/widget/src/components/Common/Table/Table.tsx
+++ b/apps/widget/src/components/Common/Table/Table.tsx
@@ -211,10 +211,13 @@ export const Table = forwardRef(
}
}}
beforeKeyDown={(event) => {
- const [[row, col]] = (gridRef as any)?.current.__hotInstance?.getSelected();
- const rows = (gridRef as any)?.current?.__hotInstance?.countRows();
- if (event.key === 'Tab' && col === headings.length - 1) {
- (gridRef as any)?.current.__hotInstance.selectCell(Math.min(rows, row + 1), selectEnabled ? 3 : 1);
+ const selected = (gridRef as any)?.current.__hotInstance?.getSelected();
+ if (Array.isArray(selected) && selected.length > 0 && Array.isArray(selected[0])) {
+ const [[row, col]] = selected;
+ const rows = (gridRef as any)?.current?.__hotInstance?.countRows();
+ if (event.key === 'Tab' && col === headings.length - 1) {
+ (gridRef as any)?.current.__hotInstance.selectCell(Math.min(rows, row + 1), selectEnabled ? 3 : 1);
+ }
}
}}
fillHandle={{
diff --git a/apps/widget/src/components/widget/Widget.tsx b/apps/widget/src/components/widget/Widget.tsx
index e0dda10a..8f2d5898 100644
--- a/apps/widget/src/components/widget/Widget.tsx
+++ b/apps/widget/src/components/widget/Widget.tsx
@@ -157,14 +157,7 @@ export function Widget() {
return (
-
+
{PhaseView[phase]}
; // https://github.com/Pikaday/Pikaday#configuration
renderer?:
| 'custom'
| 'check'
diff --git a/packages/client/src/config/texts.config.ts b/packages/client/src/config/texts.config.ts
index f826c026..33c37abd 100644
--- a/packages/client/src/config/texts.config.ts
+++ b/packages/client/src/config/texts.config.ts
@@ -25,6 +25,7 @@ export const WIDGET_TEXTS = {
CONFIGURE_JOB: 'Configure',
SCHEDULE_JOB: 'Schedule',
CONFIRM_JOB: 'Confirm',
+ REVIEW_EDIT: 'Review & Edit',
},
FILE_DROP_AREA: {
DROP_FILE: 'Drop and drop a file here',