Skip to content

Commit

Permalink
fixed the issue with re-importing projects
Browse files Browse the repository at this point in the history
  • Loading branch information
vipinpaul committed Dec 6, 2023
1 parent 927e5b1 commit 39c984e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions renderer/src/layouts/projects/ImportProjectPopUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export default function ImportProjectPopUp(props) {
setValid(false);
closePopUp(false);
setShow(false);
setSbData({});
setImportProgress((prev)=>({...prev, importStarted:false, completedSteps: 0, totalSteps: 4}))
}

Expand All @@ -83,6 +82,7 @@ export default function ImportProjectPopUp(props) {
});
} else {
logger.debug('ImportProjectPopUp.js', 'Didn\'t select any project');
setSbData({});
close();
}
setFolderPath(chosenFolder.filePaths[0]);
Expand Down Expand Up @@ -111,6 +111,7 @@ export default function ImportProjectPopUp(props) {
setSnackText(status[0].value);
setImportProgress((prev)=>({...prev, importStarted:true, completedSteps: 0, totalSteps: 0}))
if (status[0].type === 'success') {
setSbData({});
close();
FetchProjects();
router.push('/projects');
Expand All @@ -135,6 +136,7 @@ export default function ImportProjectPopUp(props) {

const callFunction = () => {
if (model.buttonName === 'Replace') {
setMerge(false);
checkBurritoVersion();
} else {
callImport(true);
Expand All @@ -148,6 +150,7 @@ export default function ImportProjectPopUp(props) {
modelClose();
await mergeProject(folderPath, currentUser, setConflictPopup, setModel, setProcessMerge);
setMerge(false)
setSbData({});
close()
logger.debug('importProjectPopUp.js', 'git merge process done');
}
Expand All @@ -160,7 +163,6 @@ export default function ImportProjectPopUp(props) {
if (sbData.duplicate === true) {
logger.warn('ImportProjectPopUp.js', 'Project already available');
// currently MERGE feature only Enabled for OBS projects
console.log({sbData});
if (sbData?.burritoType === 'gloss / textStories'){
setMerge(true)
}
Expand Down

0 comments on commit 39c984e

Please sign in to comment.