Closed ducmvo closed 1 year ago
Currently VisitInfoForm has only one submit button and the button is used on multiple pages, like check-in, check-out, and editing visit details. I am thinking about adding another button in VisitInfoForm next to the existing one, conditionally displayed and controlled by adding a new param showSaveButton. Like: `{showSaveButton && ( <Button type="submit" className={styles.submitBtn} onClick={handleSubmit}
Save )} `
The problem is that I'm not sure how to avoid triggering the Modal on the checkout page when clicking on the new save button. Currently the two buttons perform the same functionality.
Any thoughts would be appreciated! @Kevinjchang98 @ducmvo
Currently VisitInfoForm has only one submit button and the button is used on multiple pages, like check-in, check-out, and editing visit details. I am thinking about adding another button in VisitInfoForm next to the existing one, conditionally displayed and controlled by adding a new param showSaveButton. Like:
{showSaveButton && ( <Button type="submit" className={styles.submitBtn} onClick={handleSubmit} > Save </Button> )}
The problem is that I'm not sure how to avoid triggering the Modal on the checkout page when clicking on the new save button. Currently the two buttons perform the same functionality.
Any thoughts would be appreciated! @Kevinjchang98 @ducmvo
Can we add a Save only
button on the checkout Modal itself instead since it's more specific to the checkout page than the VisitInfoForm? @lmeng25 @Kevinjchang98
Currently VisitInfoForm has only one submit button and the button is used on multiple pages, like check-in, check-out, and editing visit details. I am thinking about adding another button in VisitInfoForm next to the existing one, conditionally displayed and controlled by adding a new param showSaveButton. Like:
{showSaveButton && ( <Button type="submit" className={styles.submitBtn} onClick={handleSubmit} > Save </Button> )}
The problem is that I'm not sure how to avoid triggering the Modal on the checkout page when clicking on the new save button. Currently the two buttons perform the same functionality. Any thoughts would be appreciated! @Kevinjchang98 @ducmvoCan we add a
Save only
button on the checkout Modal itself instead since it's more specific to the checkout page than the VisitInfoForm? @lmeng25 @Kevinjchang98
Okay sound good to me! Are we talking about something like this? @ducmvo
Currently VisitInfoForm has only one submit button and the button is used on multiple pages, like check-in, check-out, and editing visit details. I am thinking about adding another button in VisitInfoForm next to the existing one, conditionally displayed and controlled by adding a new param showSaveButton. Like:
{showSaveButton && ( <Button type="submit" className={styles.submitBtn} onClick={handleSubmit} > Save </Button> )}
The problem is that I'm not sure how to avoid triggering the Modal on the checkout page when clicking on the new save button. Currently the two buttons perform the same functionality. Any thoughts would be appreciated! @Kevinjchang98 @ducmvoCan we add a
Save only
button on the checkout Modal itself instead since it's more specific to the checkout page than the VisitInfoForm? @lmeng25 @Kevinjchang98Okay sound good to me! Are we talking about something like this? @ducmvo
Yes
Nit: could we move the "Save Only" button to the middle since since the primary action is "Confirm Checkout"
Currently in checkout page there only a save and checkout button. There should be a save button to update visit data without checking out a client The save and check out button should display only for currently checked in client