@bigbinary/neeto-approvals-frontend 0.0.12 → 0.0.13

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/dist/index.cjs.js CHANGED
@@ -3914,7 +3914,7 @@ var validations$1 = {
3914
3914
  name: "Please enter name",
3915
3915
  description: "Please enter description",
3916
3916
  visibility: "Please select visibility",
3917
- recipient: "Please select a recipient",
3917
+ approver: "Please select a approver",
3918
3918
  message: "Please enter a message",
3919
3919
  variable: "Please enter variable"
3920
3920
  };
@@ -3926,7 +3926,7 @@ var inputs = {
3926
3926
  firstName: "First name",
3927
3927
  lastName: "Last name",
3928
3928
  description: "Description",
3929
- recipient: "Recipient",
3929
+ approver: "Approver",
3930
3930
  variableMapping: "Variable mapping",
3931
3931
  message: "Message"
3932
3932
  },
@@ -8727,13 +8727,13 @@ const TEMPLATE_FORM_INITIAL_VALUES = {
8727
8727
  name: "",
8728
8728
  description: "",
8729
8729
  visibility: "",
8730
- recipient: "",
8730
+ approver: "",
8731
8731
  variables: [],
8732
8732
  message: ""
8733
8733
  };
8734
8734
  const TEMPLATE_FORM_VALIDATION_SCHEMA = yup__namespace.object().shape({
8735
8735
  name: yup__namespace.string().trim().required(t$2("validations.name")),
8736
- recipient: yup__namespace.object().required(t$2("validations.recipient")),
8736
+ approver: yup__namespace.object().required(t$2("validations.approver")),
8737
8737
  message: yup__namespace.string().test("message", t$2("validations.message"), content => !fr(content)),
8738
8738
  variables: yup__namespace.array().of(yup__namespace.object().shape({
8739
8739
  variable: yup__namespace.string().trim().required(t$2("validations.variable"))
@@ -8839,8 +8839,8 @@ const Form$1 = _ref => {
8839
8839
  }), /*#__PURE__*/t__default["default"].createElement("div", {
8840
8840
  className: "flex space-x-6"
8841
8841
  }, /*#__PURE__*/t__default["default"].createElement(formik.Select, {
8842
- name: "recipient",
8843
- label: t("inputs.labels.recipient"),
8842
+ name: "approver",
8843
+ label: t("inputs.labels.approver"),
8844
8844
  options: approvers.map(approver => ({
8845
8845
  label: approver.name,
8846
8846
  value: approver.id
@@ -8867,7 +8867,7 @@ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) {
8867
8867
  const buildTemplatePayload = template => {
8868
8868
  const variables = template.variables,
8869
8869
  visibility = template.visibility,
8870
- recipient = template.recipient;
8870
+ approver = template.approver;
8871
8871
  const indexedVariables = variables.map((_ref, index) => {
8872
8872
  let variable = _ref.variable;
8873
8873
  return [`variable${index + 1}`, variable];
@@ -8875,7 +8875,7 @@ const buildTemplatePayload = template => {
8875
8875
  const payload = {
8876
8876
  template: _objectSpread$3(_objectSpread$3({}, template), {}, {
8877
8877
  accessibleId: visibility.value,
8878
- approverId: recipient.value,
8878
+ approverId: approver.value,
8879
8879
  variables: ramda.fromPairs(indexedVariables)
8880
8880
  })
8881
8881
  };
@@ -8919,7 +8919,7 @@ const Create = _ref => {
8919
8919
  function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8920
8920
  function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8921
8921
  const Edit = _ref => {
8922
- var _template$recipient, _template$recipient2;
8922
+ var _template$approver, _template$approver2;
8923
8923
  let approvalsPath = _ref.approvalsPath,
8924
8924
  visibilityOptions = _ref.visibilityOptions,
8925
8925
  templateUrl = _ref.templateUrl;
@@ -8968,9 +8968,9 @@ const Edit = _ref => {
8968
8968
  isLoading: isUpdating,
8969
8969
  initialData: _objectSpread$2(_objectSpread$2({}, template), {}, {
8970
8970
  visibility: template.accessible.id,
8971
- recipient: {
8972
- label: (_template$recipient = template.recipient) === null || _template$recipient === void 0 ? void 0 : _template$recipient.name,
8973
- value: (_template$recipient2 = template.recipient) === null || _template$recipient2 === void 0 ? void 0 : _template$recipient2.id
8971
+ approver: {
8972
+ label: (_template$approver = template.approver) === null || _template$approver === void 0 ? void 0 : _template$approver.name,
8973
+ value: (_template$approver2 = template.approver) === null || _template$approver2 === void 0 ? void 0 : _template$approver2.id
8974
8974
  },
8975
8975
  variables: Object.values(template.variables).map(variable => ({
8976
8976
  variable