@truedat/dq 4.48.0 → 4.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.48.1] 2022-07-07
4
+
5
+ ### Added
6
+
7
+ - [TD-4945] User with permission can save or published on edition
8
+
3
9
  ## [4.48.0] 2022-07-07
4
10
 
5
11
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dq",
3
- "version": "4.48.0",
3
+ "version": "4.48.1",
4
4
  "description": "Truedat Web Data Quality Module",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -110,5 +110,5 @@
110
110
  "react-dom": ">= 16.8.6 < 17",
111
111
  "semantic-ui-react": ">= 0.88.2 < 2.1"
112
112
  },
113
- "gitHead": "c4587d045fa6c9028082bdfbcfb35e4383f117ed"
113
+ "gitHead": "f9de67a5791658396a5023b8d9fe24de6d75d943"
114
114
  }
@@ -207,10 +207,9 @@ export const RuleImplementationForm = ({
207
207
  return _.prop("isValid")(_.nth(index)(steps))();
208
208
  };
209
209
 
210
- const doSubmit = () => {
210
+ const doSubmit = (params) => {
211
211
  if (_.every((s) => _.prop("isValid")(s)())(steps)) {
212
- const canPublish = !!actions?.publish;
213
- onSubmit(canPublish ? { status: "published" } : {});
212
+ onSubmit(params);
214
213
  }
215
214
  };
216
215
 
@@ -309,21 +308,40 @@ export const RuleImplementationForm = ({
309
308
  </Grid.Row>
310
309
  <Divider hidden />
311
310
  <Grid.Row stretched>
312
- <Button
313
- floated="right"
314
- disabled={isButtonDisabled(activeStep)}
315
- type="submit"
316
- primary
317
- loading={isSubmitting}
318
- onClick={() =>
319
- getNextStep(activeStep) ? setNextStep(activeStep) : doSubmit()
320
- }
321
- content={
322
- getNextStep(activeStep)
323
- ? formatMessage({ id: "actions.next" })
324
- : formatMessage({ id: "actions.save" })
325
- }
326
- />
311
+ {getNextStep(activeStep) == null ? (
312
+ <>
313
+ {!!actions?.publish ? (
314
+ <Button
315
+ floated="right"
316
+ disabled={isButtonDisabled(activeStep)}
317
+ type="submit"
318
+ primary
319
+ loading={isSubmitting}
320
+ onClick={() => doSubmit({ status: "published" })}
321
+ content={formatMessage({ id: "actions.publish" })}
322
+ />
323
+ ) : null}
324
+ <Button
325
+ floated="right"
326
+ disabled={isButtonDisabled(activeStep)}
327
+ type="submit"
328
+ primary
329
+ loading={isSubmitting}
330
+ onClick={() => doSubmit({})}
331
+ content={formatMessage({ id: "actions.save" })}
332
+ />
333
+ </>
334
+ ) : (
335
+ <Button
336
+ floated="right"
337
+ disabled={isButtonDisabled(activeStep)}
338
+ type="submit"
339
+ primary
340
+ loading={isSubmitting}
341
+ onClick={() => setNextStep(activeStep)}
342
+ content={formatMessage({ id: "actions.next" })}
343
+ />
344
+ )}
327
345
  <Button
328
346
  floated="right"
329
347
  secondary