UNPKG

@rsc-labs/medusa-documents

Version:
29 lines (28 loc) 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); /* * Copyright 2024 RSC-Labs, https://rsoftcon.com/ * * MIT License * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const ui_1 = require("@medusajs/ui"); const material_1 = require("@mui/material"); const medusa_react_1 = require("medusa-react"); const InvoiceSettingsDisplayNumber = ({ formatNumber, forcedNumber }) => { const { data, isLoading } = (0, medusa_react_1.useAdminCustomQuery)("/invoice/display-number", [formatNumber, forcedNumber], { formatNumber: formatNumber, forcedNumber: forcedNumber }); if (isLoading) { return ((0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, children: (0, jsx_runtime_1.jsx)(ui_1.Input, { readOnly: true }) })); } return ((0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, children: (0, jsx_runtime_1.jsx)(ui_1.Input, { defaultValue: data.displayNumber, readOnly: true }, `display-number-${data.displayNumber}`) })); }; exports.default = InvoiceSettingsDisplayNumber;