mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 22:24:11 +00:00
refactor: allow user to review import map
This commit is contained in:
committed by
Carlos Valente
parent
becd734ea8
commit
162693e19e
+5
-2
@@ -15,10 +15,10 @@ interface ImportReviewProps {
|
||||
customFields: CustomFields;
|
||||
onFinished: () => void;
|
||||
onCancel: () => void;
|
||||
onBack: () => void;
|
||||
}
|
||||
|
||||
export default function ImportReview(props: ImportReviewProps) {
|
||||
const { rundown, customFields, onFinished, onCancel } = props;
|
||||
export default function ImportReview({ rundown, customFields, onFinished, onCancel, onBack }: ImportReviewProps) {
|
||||
const { data: currentRundown } = useRundown();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { importRundown } = useGoogleSheet();
|
||||
@@ -55,6 +55,9 @@ export default function ImportReview(props: ImportReviewProps) {
|
||||
<Button onClick={handleCancel} variant='ghosted' disabled={loading}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={onBack} variant='subtle' disabled={loading}>
|
||||
Back
|
||||
</Button>
|
||||
<Button onClick={applyImport} variant='primary' loading={loading}>
|
||||
Apply
|
||||
</Button>
|
||||
|
||||
+2
@@ -39,6 +39,7 @@ export default function SourcesPanel() {
|
||||
const setCustomFields = useSheetStore((state) => state.setCustomFields);
|
||||
const setSheetId = useSheetStore((state) => state.setSheetId);
|
||||
const sheetId = useSheetStore((state) => state.sheetId);
|
||||
const resetPreview = useSheetStore((state) => state.resetPreview);
|
||||
|
||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
@@ -221,6 +222,7 @@ export default function SourcesPanel() {
|
||||
customFields={customFields}
|
||||
onFinished={handleFinished}
|
||||
onCancel={cancelImportMap}
|
||||
onBack={resetPreview}
|
||||
/>
|
||||
)}
|
||||
</Panel.Card>
|
||||
|
||||
Reference in New Issue
Block a user