|
1 | 1 | import type { ApolloQueryResult } from "@apollo/client";
|
2 | 2 | import { gql } from "@apollo/client";
|
3 |
| -import Box from "@material-ui/core/Box"; |
4 | 3 | import Button from "@material-ui/core/Button";
|
5 | 4 | import Dialog from "@material-ui/core/Dialog";
|
6 | 5 | import DialogActions from "@material-ui/core/DialogActions";
|
7 | 6 | import DialogContent from "@material-ui/core/DialogContent";
|
8 | 7 | import DialogContentText from "@material-ui/core/DialogContentText";
|
| 8 | +import Grid from "@material-ui/core/Grid"; |
9 | 9 | import type { CampaignVariablePage } from "@spoke/spoke-codegen";
|
10 | 10 | import produce from "immer";
|
11 | 11 | import isEqual from "lodash/isEqual";
|
@@ -321,6 +321,7 @@ const CampaignInteractionStepsForm: React.FC<InnerProps> = (props) => {
|
321 | 321 | const isSaveDisabled =
|
322 | 322 | isWorking || hasEmptyScripts || (!isNew && !hasPendingChanges);
|
323 | 323 | const finalSaveLabel = isWorking ? "Working..." : saveLabel;
|
| 324 | + const upperSaveLabel = isWorking ? "Working..." : "Save"; |
324 | 325 |
|
325 | 326 | const tree = makeTree(interactionSteps);
|
326 | 327 | const finalFree: InteractionStepWithChildren = isEqual(tree, {
|
@@ -389,9 +390,22 @@ const CampaignInteractionStepsForm: React.FC<InnerProps> = (props) => {
|
389 | 390 | title="What do you want to discuss?"
|
390 | 391 | subtitle="You can add scripts and questions and your texters can indicate responses from your contacts. For example, you might want to collect RSVPs to an event or find out whether to follow up about a different volunteer activity."
|
391 | 392 | />
|
392 |
| - <Box m={2}> |
393 |
| - <ScriptPreviewButton campaignId={campaignId} /> |
394 |
| - </Box> |
| 393 | + <Grid container style={{ padding: "8px" }} justifyContent="space-between"> |
| 394 | + <Grid item xs={4}> |
| 395 | + <ScriptPreviewButton campaignId={campaignId} /> |
| 396 | + </Grid> |
| 397 | + <Grid item xs={1}> |
| 398 | + <Button |
| 399 | + {...dataTest("interactionSubmit", true)} |
| 400 | + variant="contained" |
| 401 | + color="primary" |
| 402 | + disabled={isSaveDisabled} |
| 403 | + onClick={handleSave} |
| 404 | + > |
| 405 | + {upperSaveLabel} |
| 406 | + </Button> |
| 407 | + </Grid> |
| 408 | + </Grid> |
395 | 409 | {renderInvalidScriptFields()}
|
396 | 410 | <InteractionStepCard
|
397 | 411 | interactionStep={finalFree}
|
|
0 commit comments