@openmrs/esm-stock-management-app 3.0.1-pre.883 → 3.0.1-pre.889
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/10.js +1 -1
- package/dist/119.js +1 -1
- package/dist/152.js +1 -1
- package/dist/172.js +1 -1
- package/dist/20.js +1 -1
- package/dist/235.js +1 -1
- package/dist/27.js +1 -1
- package/dist/27.js.map +1 -1
- package/dist/290.js +1 -1
- package/dist/291.js +1 -0
- package/dist/291.js.map +1 -0
- package/dist/299.js +1 -0
- package/dist/299.js.map +1 -0
- package/dist/33.js +1 -1
- package/dist/467.js +1 -1
- package/dist/574.js +1 -1
- package/dist/642.js +1 -1
- package/dist/675.js +1 -1
- package/dist/703.js +1 -1
- package/dist/734.js +2 -0
- package/dist/{842.js.map → 734.js.map} +1 -1
- package/dist/93.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-stock-management-app.js +1 -1
- package/dist/openmrs-esm-stock-management-app.js.buildmanifest.json +99 -99
- package/dist/openmrs-esm-stock-management-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/dashboard/home-dashboard.component.tsx +7 -11
- package/src/index.ts +2 -2
- package/src/routes.json +2 -2
- package/src/stock-items/add-stock-item/stock-item-details/stock-item-details.component.tsx +1 -1
- package/src/stock-operations/stock-operation-actions.component.tsx +8 -8
- package/src/stock-operations/stock-operation.utils.tsx +3 -3
- package/src/stock-operations/stock-operations-forms/step2.test.tsx +0 -4
- package/src/stock-operations/stock-operations-forms/step3.test.tsx +0 -4
- package/src/stock-operations/stock-operations-forms/steps/stock-operation-submission-form-step.component.tsx +5 -5
- package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-approve-button.component.tsx +1 -1
- package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-approve-dispatch-button.component.tsx +1 -1
- package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-cancel-button.component.tsx +1 -1
- package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-complete-button.component.tsx +1 -1
- package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-completed-dispatch-button.component.tsx +1 -1
- package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-reject-button.component.tsx +1 -1
- package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-return-button.component.tsx +1 -1
- package/src/stock-operations/{stock-operations-dialog/stock-operations-dialog.component.tsx → stock-operations-modal/stock-operations.modal.tsx} +6 -12
- package/src/stock-sources/add-stock-sources/add-stock-sources.test.tsx +2 -2
- package/translations/en.json +0 -1
- package/dist/606.js +0 -1
- package/dist/606.js.map +0 -1
- package/dist/842.js +0 -2
- package/dist/991.js +0 -1
- package/dist/991.js.map +0 -1
- package/src/core/components/overlay/hook.ts +0 -47
- package/src/core/components/overlay/overlay.component.tsx +0 -43
- package/src/core/components/overlay/overlay.scss +0 -98
- /package/dist/{842.js.LICENSE.txt → 734.js.LICENSE.txt} +0 -0
- /package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-issue-stock-button.component.tsx +0 -0
- /package/src/stock-operations/{stock-operations-dialog → stock-operations-modal}/stock-operations-print-button.component.tsx +0 -0
- /package/src/stock-operations/{stock-operations-dialog/stock-operations-dialog.scss → stock-operations-modal/stock-operations.scss} +0 -0
@@ -48,10 +48,6 @@ jest.mock('../stock-operations.resource', () => ({
|
|
48
48
|
}),
|
49
49
|
}));
|
50
50
|
|
51
|
-
jest.mock('../../core/components/overlay/hook', () => ({
|
52
|
-
closeOverlay: jest.fn(),
|
53
|
-
}));
|
54
|
-
|
55
51
|
jest.mock('../../stock-items/stock-items.resource', () => ({
|
56
52
|
useStockItem: jest.fn().mockReturnValue({
|
57
53
|
isLoading: false,
|
@@ -40,10 +40,6 @@ jest.mock('../stock-operations.resource', () => ({
|
|
40
40
|
}),
|
41
41
|
}));
|
42
42
|
|
43
|
-
jest.mock('../../core/components/overlay/hook', () => ({
|
44
|
-
closeOverlay: jest.fn(),
|
45
|
-
}));
|
46
|
-
|
47
43
|
jest.mock('../../stock-items/stock-items.resource', () => ({
|
48
44
|
useStockItem: jest.fn(),
|
49
45
|
useStockItems: jest.fn().mockReturnValue({
|
@@ -9,12 +9,12 @@ import { extractErrorMessagesFromResponse } from '../../../constants';
|
|
9
9
|
import { handleMutate } from '../../../utils';
|
10
10
|
import { OperationType, type StockOperationType } from '../../../core/api/types/stockOperation/StockOperationType';
|
11
11
|
import { otherUser } from '../../../core/utils/utils';
|
12
|
-
import {
|
12
|
+
import { launchStockOperationsModal } from '../../stock-operation.utils';
|
13
13
|
import { type StockOperationDTO } from '../../../core/api/types/stockOperation/StockOperationDTO';
|
14
14
|
import { type StockOperationItemDTO } from '../../../core/api/types/stockOperation/StockOperationItemDTO';
|
15
15
|
import { type StockOperationItemDtoSchema } from '../../validation-schema';
|
16
|
-
import styles from '../stock-operation-form.scss';
|
17
16
|
import useOperationTypePermisions from '../hooks/useOperationTypePermisions';
|
17
|
+
import styles from '../stock-operation-form.scss';
|
18
18
|
|
19
19
|
type StockOperationSubmissionFormStepProps = {
|
20
20
|
onPrevious?: () => void;
|
@@ -125,17 +125,17 @@ const StockOperationSubmissionFormStep: React.FC<StockOperationSubmissionFormSte
|
|
125
125
|
|
126
126
|
const handleComplete = useCallback(() => {
|
127
127
|
handleSave().then((operation) => {
|
128
|
-
|
128
|
+
launchStockOperationsModal('Complete', false, { ...operation, status: 'COMPLETED' });
|
129
129
|
});
|
130
130
|
}, [handleSave]);
|
131
131
|
const handleSubmitForReview = useCallback(() => {
|
132
132
|
handleSave().then((operation) => {
|
133
|
-
|
133
|
+
launchStockOperationsModal('Submit', false, { ...operation, status: 'SUBMITTED' });
|
134
134
|
});
|
135
135
|
}, [handleSave]);
|
136
136
|
const handleDispatch = useCallback(() => {
|
137
137
|
handleSave().then((operation) => {
|
138
|
-
|
138
|
+
launchStockOperationsModal('Dispatch', false, { ...operation, status: 'DISPATCHED' });
|
139
139
|
});
|
140
140
|
}, [handleSave]);
|
141
141
|
|
@@ -13,7 +13,7 @@ interface StockOperationApprovalButtonProps {
|
|
13
13
|
const StockOperationApprovalButton: React.FC<StockOperationApprovalButtonProps> = ({ operation }) => {
|
14
14
|
const { t } = useTranslation();
|
15
15
|
const launchApprovalModal = useCallback(() => {
|
16
|
-
const dispose = showModal('stock-
|
16
|
+
const dispose = showModal('stock-operations-modal', {
|
17
17
|
title: 'Approve',
|
18
18
|
operation: operation,
|
19
19
|
requireReason: false,
|
@@ -13,7 +13,7 @@ interface StockOperationApproveDispatchButtonProps {
|
|
13
13
|
const StockOperationApproveDispatchButton: React.FC<StockOperationApproveDispatchButtonProps> = ({ operation }) => {
|
14
14
|
const { t } = useTranslation();
|
15
15
|
const launchApproveDispatchModal = useCallback(() => {
|
16
|
-
const dispose = showModal('stock-
|
16
|
+
const dispose = showModal('stock-operations-modal', {
|
17
17
|
title: 'Dispatch',
|
18
18
|
operation: operation,
|
19
19
|
requireReason: false,
|
@@ -13,7 +13,7 @@ interface StockOperationCancelButtonProps {
|
|
13
13
|
const StockOperationCancelButton: React.FC<StockOperationCancelButtonProps> = ({ operation }) => {
|
14
14
|
const { t } = useTranslation();
|
15
15
|
const launchCancelModal = useCallback(() => {
|
16
|
-
const dispose = showModal('stock-
|
16
|
+
const dispose = showModal('stock-operations-modal', {
|
17
17
|
title: 'Cancel',
|
18
18
|
operation: operation,
|
19
19
|
requireReason: true,
|
@@ -14,7 +14,7 @@ interface StockOperationCompleteButtonProps {
|
|
14
14
|
const StockOperationCompleteButton: React.FC<StockOperationCompleteButtonProps> = ({ operation, reason }) => {
|
15
15
|
const { t } = useTranslation();
|
16
16
|
const launchCompleteModal = useCallback(() => {
|
17
|
-
const dispose = showModal('stock-
|
17
|
+
const dispose = showModal('stock-operations-modal', {
|
18
18
|
title: 'Complete',
|
19
19
|
operation: operation,
|
20
20
|
requireReason: reason,
|
@@ -17,7 +17,7 @@ const StockOperationCompleteDispatchButton: React.FC<StockOperationCompleteDispa
|
|
17
17
|
}) => {
|
18
18
|
const { t } = useTranslation();
|
19
19
|
const launchcompletedDispatchModal = useCallback(() => {
|
20
|
-
const dispose = showModal('stock-
|
20
|
+
const dispose = showModal('stock-operations-modal', {
|
21
21
|
title: 'Complete Dispatch',
|
22
22
|
operation: operation,
|
23
23
|
requireReason: reason,
|
@@ -13,7 +13,7 @@ interface StockOperationRejectButtonProps {
|
|
13
13
|
const StockOperationRejectButton: React.FC<StockOperationRejectButtonProps> = ({ operation }) => {
|
14
14
|
const { t } = useTranslation();
|
15
15
|
const launchRejectModal = useCallback(() => {
|
16
|
-
const dispose = showModal('stock-
|
16
|
+
const dispose = showModal('stock-operations-modal', {
|
17
17
|
title: 'Reject',
|
18
18
|
operation: operation,
|
19
19
|
requireReason: true,
|
@@ -13,7 +13,7 @@ interface StockOperationReturnButtonProps {
|
|
13
13
|
const StockOperationReturnButton: React.FC<StockOperationReturnButtonProps> = ({ operation }) => {
|
14
14
|
const { t } = useTranslation();
|
15
15
|
const launchReturnModal = useCallback(() => {
|
16
|
-
const dispose = showModal('stock-
|
16
|
+
const dispose = showModal('stock-operations-modal', {
|
17
17
|
title: 'Return',
|
18
18
|
operation: operation,
|
19
19
|
requireReason: true,
|
@@ -1,32 +1,28 @@
|
|
1
1
|
import React, { useState } from 'react';
|
2
2
|
import { useTranslation } from 'react-i18next';
|
3
|
+
import { Button, Form, InlineLoading, ModalBody, ModalFooter, ModalHeader, TextArea } from '@carbon/react';
|
4
|
+
import { getCoreTranslation, restBaseUrl, showSnackbar } from '@openmrs/esm-framework';
|
3
5
|
import { type StockOperationDTO } from '../../core/api/types/stockOperation/StockOperationDTO';
|
4
|
-
import { Button, Form, ModalBody, ModalFooter, ModalHeader, TextArea, InlineLoading } from '@carbon/react';
|
5
|
-
import styles from './stock-operations-dialog.scss';
|
6
6
|
import {
|
7
7
|
type StopOperationAction,
|
8
8
|
type StopOperationActionType,
|
9
9
|
} from '../../core/api/types/stockOperation/StockOperationAction';
|
10
10
|
import { executeStockOperationAction } from '../stock-operations.resource';
|
11
|
-
import { getCoreTranslation, restBaseUrl, showSnackbar } from '@openmrs/esm-framework';
|
12
|
-
import { closeOverlay } from '../../core/components/overlay/hook';
|
13
11
|
import { extractErrorMessagesFromResponse } from '../../constants';
|
14
12
|
import { handleMutate } from '../../utils';
|
13
|
+
import styles from './stock-operations.scss';
|
15
14
|
|
16
|
-
interface
|
15
|
+
interface StockOperationsModalProps {
|
17
16
|
title: string;
|
18
17
|
requireReason: boolean;
|
19
18
|
operation: StockOperationDTO;
|
20
19
|
closeModal: () => void;
|
21
20
|
}
|
22
21
|
|
23
|
-
const
|
22
|
+
const StockOperationsModal: React.FC<StockOperationsModalProps> = ({ title, requireReason, operation, closeModal }) => {
|
24
23
|
const confirmType = title.toLocaleLowerCase().trim();
|
25
|
-
|
26
24
|
const { t } = useTranslation();
|
27
|
-
|
28
25
|
const [notes, setNotes] = useState('');
|
29
|
-
|
30
26
|
const [isApproving, setIsApproving] = useState(false);
|
31
27
|
|
32
28
|
const handleClick = async (event) => {
|
@@ -88,7 +84,6 @@ const StockOperationDialog: React.FC<StockOperationDialogProps> = ({ title, requ
|
|
88
84
|
kind: 'success',
|
89
85
|
}),
|
90
86
|
closeModal();
|
91
|
-
closeOverlay();
|
92
87
|
handleMutate(`${restBaseUrl}/stockmanagement/stockoperation`);
|
93
88
|
},
|
94
89
|
(err) => {
|
@@ -103,7 +98,6 @@ const StockOperationDialog: React.FC<StockOperationDialogProps> = ({ title, requ
|
|
103
98
|
kind: 'error',
|
104
99
|
}),
|
105
100
|
closeModal();
|
106
|
-
closeOverlay();
|
107
101
|
},
|
108
102
|
);
|
109
103
|
};
|
@@ -144,4 +138,4 @@ const StockOperationDialog: React.FC<StockOperationDialogProps> = ({ title, requ
|
|
144
138
|
);
|
145
139
|
};
|
146
140
|
|
147
|
-
export default
|
141
|
+
export default StockOperationsModal;
|
@@ -149,7 +149,7 @@ describe('StockSourcesAddOrUpdate', () => {
|
|
149
149
|
await user.click(screen.getByText('Save'));
|
150
150
|
});
|
151
151
|
|
152
|
-
it('shows success message and closes
|
152
|
+
it('shows success message and closes the workspace on successful submission', async () => {
|
153
153
|
const user = userEvent.setup();
|
154
154
|
mockCreateOrUpdateStockSource.mockResolvedValue({
|
155
155
|
data: {},
|
@@ -186,7 +186,7 @@ describe('StockSourcesAddOrUpdate', () => {
|
|
186
186
|
await user.click(screen.getByText(/save/i));
|
187
187
|
});
|
188
188
|
|
189
|
-
it('closes
|
189
|
+
it('closes workspace when cancel button is clicked', async () => {
|
190
190
|
const user = userEvent.setup();
|
191
191
|
render(
|
192
192
|
<StockSourcesAddOrUpdate
|
package/translations/en.json
CHANGED
@@ -327,7 +327,6 @@
|
|
327
327
|
"submittingForReview": "Submitting for review",
|
328
328
|
"success": "Success",
|
329
329
|
"successfullysaved": "You have successfully saved user role scope",
|
330
|
-
"tabletOverlay": "Tablet overlay",
|
331
330
|
"tags": "Tags",
|
332
331
|
"timeTaken": "Time Taken",
|
333
332
|
"to": "To",
|
package/dist/606.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_stock_management_app=globalThis.webpackChunk_openmrs_esm_stock_management_app||[]).push([[606],{1669:(e,n,t)=>{t.d(n,{Z:()=>s});var a=t(1364),o=t.n(a),r=t(1682),c=t.n(r)()(o());c.push([e.id,".-esm-stock-management__stock-operations-dialog__section___LpGWF{margin:.5rem}.-esm-stock-management__stock-operations-dialog__sectionTitle___vqFIP{margin-bottom:.75rem}.-esm-stock-management__stock-operations-dialog__modalBody___17qtG{padding-bottom:1rem}","",{version:3,sources:["webpack://./src/stock-operations/stock-operations-dialog/stock-operations-dialog.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAGA,iEACE,YCiBW,CDdb,sEACE,oBCkBW,CDfb,mEACE,mBCmBW",sourcesContent:["@use '@carbon/layout';\n@use '@carbon/type';\n\n.section {\n margin: layout.$spacing-03;\n}\n\n.sectionTitle {\n margin-bottom: layout.$spacing-04;\n}\n\n.modalBody {\n padding-bottom: layout.$spacing-05;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),c.locals={section:"-esm-stock-management__stock-operations-dialog__section___LpGWF",sectionTitle:"-esm-stock-management__stock-operations-dialog__sectionTitle___vqFIP",modalBody:"-esm-stock-management__stock-operations-dialog__modalBody___17qtG"};const s=c},9606:(e,n,t)=>{t.r(n),t.d(n,{default:()=>x});var a=t(1672),o=t.n(a),r=t(3397),c=t(5787),s=t(7410),i=t.n(s),l=t(4766),u=t.n(l),p=t(1991),m=t.n(p),g=t(3702),b=t.n(g),d=t(2434),y=t.n(d),f=t(1422),_=t.n(f),h=t(1669),k={};k.styleTagTransform=_(),k.setAttributes=b(),k.insert=m().bind(null,"head"),k.domAPI=u(),k.insertStyleElement=y(),i()(h.Z,k);const v=h.Z&&h.Z.locals?h.Z.locals:void 0;var E=t(5048),$=t(3775),C=t(3466),T=t(826),N=t(954);function w(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function S(e,n,t,a,o,r,c){try{var s=e[r](c),i=s.value}catch(e){return void t(e)}s.done?n(i):Promise.resolve(i).then(a,o)}function A(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,o,r=[],c=!0,s=!1;try{for(t=t.call(e);!(c=(a=t.next()).done)&&(r.push(a.value),!n||r.length!==n);c=!0);}catch(e){s=!0,o=e}finally{try{c||null==t.return||t.return()}finally{if(s)throw o}}return r}}(e,n)||function(e,n){if(e){if("string"==typeof e)return w(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?w(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const x=function(e){var n,t,s=e.title,i=e.requireReason,l=e.operation,u=e.closeModal,p=s.toLocaleLowerCase().trim(),m=(0,r.useTranslation)().t,g=A((0,a.useState)(""),2),b=g[0],d=g[1],y=A((0,a.useState)(!1),2),f=y[0],_=y[1],h=(n=function(e){var n,t;return function(e,n){var t,a,o,r,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(t)throw new TypeError("Generator is already executing.");for(;c;)try{if(t=1,a&&(o=2&r[0]?a.return:r[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;switch(a=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return c.label++,{value:r[1],done:!1};case 5:c.label++,a=r[1],r=[0];continue;case 7:r=c.ops.pop(),c.trys.pop();continue;default:if(!((o=(o=c.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){c=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){c.label=r[1];break}if(6===r[0]&&c.label<o[1]){c.label=o[1],o=r;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(r);break}o[2]&&c.ops.pop(),c.trys.pop();continue}r=n.call(e,c)}catch(e){r=[6,e],a=0}finally{t=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}(this,(function(a){switch(e.preventDefault(),_(!0),n=null,p){case"submit":n="SUBMIT";break;case"dispatch":case"dispatchapproval":n="DISPATCH";break;case"complete":case"complete dispatch":n="COMPLETE";break;case"cancel":n="CANCEL";break;case"reject":n="REJECT";break;case"return":n="RETURN";break;case"approve":n="APPROVE"}return n?(t={name:n,uuid:null==l?void 0:l.uuid,reason:b},(0,E._e)(t).then((function(){_(!1),(0,$.showSnackbar)({title:m("operationSuccessTitle","{{title}} Operation",{title:s}),subtitle:m("operationSuccessful","You have successfully {{title}} operation",{title:s}),kind:"success"}),u(),(0,C.Km)(),(0,N.d)("".concat($.restBaseUrl,"/stockmanagement/stockoperation"))}),(function(e){_(!1);var n=(0,T.cK)(e)[0].replace(/[[\]]/g,"");(0,$.showSnackbar)({title:m("stockOperationErrorTitle","Error on saving form"),subtitle:m("stockOperationErrorDescription","Details: {{message}}",{message:n}),kind:"error"}),u(),(0,C.Km)()})),[2]):[2]}))},t=function(){var e=this,t=arguments;return new Promise((function(a,o){var r=n.apply(e,t);function c(e){S(r,a,o,c,s,"next",e)}function s(e){S(r,a,o,c,s,"throw",e)}c(void 0)}))},function(e){return t.apply(this,arguments)});return o().createElement("div",null,o().createElement(c.l09,{onSubmit:h},o().createElement(c.xBx,{closeModal:u,title:m("operationModalTitle","{{title}} Operation",{title:s})}),o().createElement(c.fef,null,o().createElement("div",{className:v.modalBody},o().createElement("section",{className:v.section},o().createElement("h5",{className:v.section},"Would you really like to ",s," the operation ?")),o().createElement("br",null),i&&o().createElement("section",{className:v.section},o().createElement(c.Kx8,{labelText:m("notes","Please explain the reason:"),id:"nextNotes",name:"nextNotes",invalidText:"Required",maxCount:500,enableCounter:!0,onChange:function(e){return d(e.target.value)}})))),o().createElement(c.mzw,null,o().createElement(c.zxk,{kind:"secondary",onClick:u},(0,$.getCoreTranslation)("cancel")),f?o().createElement(c.lSo,null):o().createElement(c.zxk,{type:"submit"},m("submit","Submit")))))}}}]);
|
package/dist/606.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"606.js","mappings":"mNAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,mQAAoQ,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wFAAwF,wEAAwE,MAAQ,GAAG,SAAW,uDAAuD,eAAiB,CAAC,uNAAuN,25DAA25D,WAAa,MAEtsFH,EAAwBI,OAAS,CAChC,QAA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ock-operations/stock-operations-dialog/stock-operations-dialog.scss","webpack://@openmrs/esm-stock-management-app/./src/stock-operations/stock-operations-dialog/stock-operations-dialog.scss?bec9","webpack://@openmrs/esm-stock-management-app/./src/stock-operations/stock-operations-dialog/stock-operations-dialog.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","title","requireReason","operation","closeModal","confirmType","toLocaleLowerCase","trim","useTranslation","t","useState","notes","setNotes","isApproving","setIsApproving","handleClick","event","actionName","payload","preventDefault","name","uuid","reason","executeStockOperationAction","then","showSnackbar","subtitle","kind","closeOverlay","handleMutate","restBaseUrl","err","message","extractErrorMessagesFromResponse","replace","div","Form","onSubmit","ModalHeader","ModalBody","className","styles","modalBody","section","h5","br","TextArea","labelText","invalidText","maxCount","enableCounter","onChange","e","target","value","ModalFooter","Button","onClick","getCoreTranslation","InlineLoading","type"],"sourceRoot":""}
|