UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

33 lines 1.83 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const React = require("react"); const lodash_1 = require("lodash"); const cosmoui_1 = require("cosmoui"); class JobInfoForm extends React.Component { constructor() { super(...arguments); this.spacedColumnStyle = (space) => ({ flex: '1', marginRight: `${space}em`, }); } render() { const { job, disabled } = this.props; return (React.createElement(cosmoui_1.Row, { fullWidth: true }, React.createElement(cosmoui_1.Column, { style: this.spacedColumnStyle(1) }, React.createElement(cosmoui_1.FormGroup, { label: "Customer" }, React.createElement(cosmoui_1.TextInput, { name: "customer", disabled: true, value: lodash_1.get(job, 'customer.name', '') })), React.createElement(cosmoui_1.FormGroup, { label: "Customer ID" }, React.createElement(cosmoui_1.TextInput, { name: "customerId", disabled: true, value: lodash_1.get(job, 'customer.accountNumber', '') }))), React.createElement(cosmoui_1.Column, { style: this.spacedColumnStyle(0) }, React.createElement(cosmoui_1.FormGroup, { label: `Items` }, React.createElement(cosmoui_1.NumberInput, { name: "items", disabled: disabled, min: 1, value: parseInt(lodash_1.get(job, 'metadata.items', ''), 10) })), React.createElement(cosmoui_1.FormGroup, { label: "Customer order no." }, React.createElement(cosmoui_1.TextInput, { name: "customerOrderNo", disabled: disabled, value: lodash_1.get(job, 'metadata.department', '') }))))); } } JobInfoForm.defaultProps = { disabled: false }; exports.JobInfoForm = JobInfoForm; //# sourceMappingURL=job-info-form.js.map