@etsoo/smarterp-core
Version:
TypeScript APIs for SmartERP Core
30 lines (29 loc) • 927 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SearchDays = SearchDays;
const jsx_runtime_1 = require("react/jsx-runtime");
const materialui_1 = require("@etsoo/materialui");
const ICoreServiceApp_1 = require("../../ICoreServiceApp");
const options = [
{ id: "", label: "---" },
{ id: 3, label: "3" },
{ id: 7, label: "7" },
{ id: 15, label: "15" },
{ id: 30, label: "30" },
{ id: 60, label: "60" },
{ id: 90, label: "90" },
{ id: 180, label: "180" }
];
/**
* Days search component
* @param props Props
* @returns Component
*/
function SearchDays(props) {
// App
const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
// Destruct
const { label = app.get("days"), search = true, ...rest } = props;
// Layout
return (0, jsx_runtime_1.jsx)(materialui_1.SelectEx, { label: label, search: search, options: options, ...rest });
}