@lynsoluciones/medusa-docs
Version:
Medusa plugins to generate docs
29 lines (28 loc) • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
/*
*
*
* 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 medusa_react_1 = require("medusa-react");
const material_1 = require("@mui/material");
const PackingSlipNumber = ({ packingSlipId }) => {
const { data, isLoading } = (0, medusa_react_1.useAdminCustomQuery)("/packing-slip", [""], {
id: packingSlipId,
});
if (isLoading) {
return (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 8 });
}
if (data && data.packingSlip) {
return ((0, jsx_runtime_1.jsx)("p", { className: "text-grey-90 group-hover:text-violet-60 pl-2", children: `Albarán: ${data.packingSlip.display_number}` }));
}
};
exports.default = PackingSlipNumber;