{
	"name": "form/nc/nc-work-center/nc-work-center.json",
	"layout": {
		"component": "nc-form",
		"attribute": {
			"id": "nc-work-center"
		},
		"element": [
			{
				"component": "nc-modal",
				"attribute": {
					":closeOnClick": "true",
					":header": "hdr.work_center.preview_modal?.header",
					":ok-text": "hdr.work_center.preview_modal?.ok",
					":show": "rec.document_preview_modal === true",
					"v-on:modal-ok": "openDocumentPreview('close')"
				},
				"element": [
					{
						"component": "nc-document-preview",
						"attribute": {
							"id": "nc-document-preview-modal-canvas",
							":loadable": "rec.document_loadable",
							":name": "rec.document_name",
							":src": "rec.document_data",
							":viewStyle": "rec.document_style_fullpage"
						}
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					":style": "{'margin-top': '-1.25em', 'height': rec.tab_open ? '4.5em' : '0.1em'}"
				},
				"element": [
					{
						"component": "nc-col",
						"attribute": {
							"width": "0.5em",
							"style": "margin-left: -1.25em",
							"v-on:click": "tabChanged('open')"
						},
						"element": [
							{
								"component": "nc-icon",
								"attribute": {
									":icon": "rec.tab_open ? 'caret-down' : 'caret-right'",
									":style": "rec.tab_open ? 'margin-top: -1.9em; margin-left: -0.20em' : 'margin-top: 0.4em; '"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"v-if": "rec.tab_open",
							"width": "auto",
							"style": "margin-bottom: 0.5em;"
						},
						"element": [
							{
								"component": "nc-tab",
								"attribute": {
									"model": "rec.tab",
									"v-on:change": "tabChanged('tab')"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"v-if": "rec.tab_open",
							"width": "20em",
							"class": ["nc-margin-left"]
						},
						"element": [
							{
								"component": "nc-label-dropdown",
								"text": "Connection",
								"attribute": {
									":horizontal": "true",
									"model": "rec.connection",
									"v-on:change": "tabChanged('tab')"
								}
							}
						]
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"v-if": "rec.tab !== 'work-center'"
				},
				"element": [
					{
						"component": "nc-grid",
						"attribute": {
							"id": "external",
							"model": "grid.external",
							":doesExternalFilterPass-": "doesExternalFilterPass",
							":isExternalFilterPresent-": "isExternalFilterPresent",
							"height": "90.5vh",
							":style": "{width: '100%'}",
							"v-on:grid-row-clicked": "gridRowClicked",
							"v-on:grid-row-double-clicked": "gridRowDoubleClicked"
						}
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"v-show": "rec.tab === 'work-center'"
				},
				"element": [
					{
						"component": "nc-row",
						"attribute": {
							"id": "person-state"
						},
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "21em",
									"class": ["nc-margin-right"]
								},
								"element": [
									{
										"component": "nc-label-dropdown",
										"text": "Person",
										"attribute": {
											":horizontal": "true",
											"label-style": "width: 4em;",
											":dropdown-style": "!rec.person ? 'border-color: Crimson' : ''",
											"model": "rec.person",
											"v-on:change": "gridRowClicked('work', null, null, true)"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "2em",
									"class": ["nc-center-v", "nc-margin-right"]
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											"id": "clear-person-button",
											"v-on:click": "emptyPersonState",
											"size": "tiny",
											"style": "width: 2em; padding-left: 0.3em",
											":disabled": "!rec.person"
										},
										"element": [
											{
												"component": "nc-icon",
												"attribute": {
													"icon": "backspace"
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"id": "unproductive",
									"width": "auto",
									"class": ["nc-center-h"]
								},
								"element": [
									{
										"component": "nc-button-group",
										"element": [
											{
												"component": "nc-button",
												"attribute": {
													":id": "'unproductive-'+button.value",
													"v-on:click": "clickButton('unproductive', button.value)",
													"v-for": "button in arr.person_state_unproductive_button",
													":disabled": "!rec.current.enterable",
													"style": "width: 7em; margin-left: 0.1em;",
													":style": "{'--button-color': button.color}",
													"class": ["toggle"],
													":class": "button.value === rec.current.unproductive ? 'active' : ''"
												},
												"element": [
													{
														":id": "'unproductive-icon-'+button.value",
														"component": "nc-icon",
														"attribute": {
															":icon": "button.icon"
														}
													},
													{
														":id": "'unproductive-span'+button.value",
														"component": "nc-span",
														"text": "{{button.show}}"
													}
												]
											},
											{
												"component": "nc-button",
												"attribute": {
													"id": "person_state_unproductive-button",
													"v-on:click": "clickButton('unproductive', rec.person_state_unproductive)",
													":disabled": "!rec.current.enterable || !rec.person_state_unproductive",
													"style": "width: 7em; margin-left: 0.1em;",
													":style": "{'--button-color': arr.person_state_unproductive[rec.person_state_unproductive_idx].color}",
													"class": ["toggle"],
													":class": "rec.person_state_unproductive === rec.current.unproductive ? 'active' : ''"
												},
												"element": [
													{
														"component": "nc-icon",
														"id": "person_state_unproductive-icon",
														"attribute": {
															":icon": "arr.person_state_unproductive[rec.person_state_unproductive_idx].icon"
														}
													},
													{
														"id": "person_state_unproductive-span",
														"component": "nc-span",
														"text": "{{arr.person_state_unproductive[rec.person_state_unproductive_idx].show}}"
													}
												]
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "8em",
											"class": ["nc-margin-right"]
										},
										"element": [
											{
												"component": "nc-dropdown",
												"attribute": {
													":disabled": "!rec.current.enterable",
													"v-on:click": "rec.person_state_unproductive_idx = nc.recordArrayIndex(arr.person_state_unproductive, 'value', rec.person_state_unproductive) || 0",
													":horizontal": "true",
													"model": "rec.person_state_unproductive"
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "11em",
									"v-if": "false",
									"class": ["nc-center-v", "nc-center-h", "nc-margin-right"]
								},
								"element": [
									{
										"component": "nc-span",
										"text": "'{{rec.current.unproductive}}' '{{rec.person_state}}' '{{rec.machine_state}}'"
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "8em",
									"v-if": "false",
									"class": ["nc-end-h"]
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											"id": "primary-button",
											"v-on:click": "clickButton('open')",
											"class": ["nc-button-wide"]
										},
										"element": [
											{
												"component": "nc-icon",
												"attribute": {
													":icon": "rec.info_open ? 'chevron-up' : 'chevron-down'"
												}
											},
											{
												"component": "nc-translate",
												":text": "rec.info_open ? 'Close' : 'Open'",
												"attribute": {
													":model": "rec.info_open ? 'hdr.work_center.button.close' : 'hdr.work_center.button.open'"
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "8em",
									"class": ["nc-end-h"]
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											"id": "primary-button",
											"v-on:click": "update(null, null, true)",
											"class": ["basic", "nc-button-wide"]
										},
										"element": [
											{
												"component": "nc-icon",
												"attribute": {
													"icon": "sync"
												}
											},
											{
												"component": "nc-translate",
												"attribute": {
													"model": "hdr.work_center.button.update"
												}
											}
										]
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "2.1em"
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											"id": "open-button",
											"v-on:click": "rec.info_open = !rec.info_open",
											"class": ["basic", "small", "circular"],
											"style": "z-index: 1; height: 28px; width: 22px; min-width: 22px; padding-left: 7px; padding-top: 7px; background-color: whitesmoke;"
										},
										"element": [
											{
												"component": "nc-icon",
												"attribute": {
													":icon": "rec.info_open ? 'circle-chevron-down' : 'circle-chevron-right'",
													"style": "background-color: white"
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto"
								},
								"element": [
									{
										"component": "nc-line"
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"class": ["nc-end-h"],
									"width": "2.3em"
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											"id": "open-button",
											"v-on:click": "rec.info_open = !rec.info_open",
											"class": ["basic", "small", "circular"],
											"style": "z-index: 1; height: 28px; width: 22px; min-width: 22px; padding-left: 7px; padding-top: 7px; background-color: whitesmoke;"
										},
										"element": [
											{
												"component": "nc-icon",
												"attribute": {
													":icon": "rec.info_open ? 'circle-chevron-down' : 'circle-chevron-left'",
													"style": "background-color: white"
												}
											}
										]
									}
								]
							}
						]
					},
					{
						"component": "transition",
						"attribute": {
							"name": "nc-slide-down",
							"v-on:after-enter": "slideDownAfterEnter",
							"v-on:after-leave": "slideDownAfterLeave",
							"v-on:before-enter": "slideDownBeforeEnter",
							"v-on:before-leave": "slideDownBeforeLeave",
							"v-on:enter": "slideDownEnter",
							"v-on:leave": "slideDownLeave"
						},
						"element": [
							{
								"component": "nc-row",
								"attribute": {
									"id": "edit",
									"v-show": "rec.info_open"
								},
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "auto"
										},
										"element": [
											{
												"component": "nc-row",
												"element": [
													{
														"component": "nc-col",
														"attribute": {
															"width": "auto",
															"class": ["nc-margin-right", "nc-align-top"]
														},
														"element": [
															{
																"component": "nc-label-input",
																"text": "Amount info",
																"attribute": {
																	"class": ["nc-disabled-input-dark"],
																	":disabled": "true",
																	":horizontal": "true",
																	"label-style": "width: 6em;",
																	"model": "rec.current.calc.amount_info"
																}
															}
														]
													}
												]
											},
											{
												"component": "nc-row",
												"element": [
													{
														"component": "nc-col",
														"attribute": { "width": "auto", "class": ["nc-margin-right"] },
														"element": [
															{
																"component": "nc-label-input",
																"text": "Time info",
																"attribute": {
																	"class": ["nc-disabled-input-dark"],
																	":disabled": "true",
																	":horizontal": "true",
																	"label-style": "width: 6em;",
																	"model": "rec.current.calc.time_info"
																}
															}
														]
													}
												]
											},
											{
												"component": "nc-row",
												"element": [
													{
														"component": "nc-col",
														"attribute": { "width": "auto", "class": ["nc-margin-right"] },
														"element": [
															{
																"component": "nc-label-input",
																"text": "Work info",
																"attribute": {
																	"class": ["nc-disabled-input-dark"],
																	":disabled": "true",
																	":horizontal": "true",
																	"label-style": "width: 6em;",
																	"model": "rec.current.calc.work_info"
																}
															}
														]
													}
												]
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "auto"
										},
										"element": [
											{
												"component": "nc-row",
												"attribute": {
													"class": ["nc-margin-right"]
												},
												"element": [
													{
														"component": "nc-col",
														"attribute": {
															"width": "12em"
														},
														"element": [
															{
																"component": "nc-label-input",
																"text": "Start amount",
																"attribute": {
																	":input-class": "rec.current.enterable && !rec.current.unproductive && rec.current.started_amount == '' ? 'not-valid-input' : ''",
																	":disabled": "rec.current.unproductive !== '' && rec.focus_field === '' || !rec.current.enterable",
																	":horizontal": "true",
																	"label-style": "width: 7em; text-align: right;",
																	"v-on:change": "fixAmount()",
																	"v-on:focus": "rec.focus_field = 'started_amount'",
																	"v-on:blur": "amountAndInfo()",
																	"model": "rec.current.started_amount"
																}
															}
														]
													},
													{
														"component": "nc-col",
														"attribute": {
															"width": "13em"
														},
														"element": [
															{
																"component": "nc-label-input",
																"text": "Machine start amount text",
																"attribute": {
																	"input-style-": "rec.current.started_amount == 0 || rec.current.started_amount < rec.current.produced_amount + rec.current.failed_amount ? 'color: red; font-weight: bold;' : ''",
																	":disabled": "true",
																	":horizontal": "true",
																	"label-style": "width: 8em; text-align: right;",
																	"v-on:change": "fixAmount()",
																	"v-on:focus": "rec.focus_field = 'machine_started_amount'",
																	"v-on:blur": "amountAndInfo()",
																	"model": "rec.current.machine_started_amount"
																}
															}
														]
													},
													{
														"component": "nc-col",
														"attribute": {
															"width": "auto",
															"class": ["nc-end-h"]
														},
														"element": [
															{
																"component": "nc-button",
																"attribute": {
																	"id": "save-button",
																	"v-if": "true || (rec.current.produced_amount > 0 || rec.current.failed_amount > 0) && rec.current.started_amount > rec.current.produced_amount + rec.current.failed_amount",
																	":disabled": "!rec.current.can_start",
																	"v-on:click": "clickButton('save', rec.person_state)",
																	"class": ["nc-button-wide"]
																},
																"element": [
																	{
																		"id": "save-icon",
																		"component": "nc-icon",
																		"attribute": {
																			":icon": "rec.button_icon.done",
																			"style": "align: center;"
																		}
																	},
																	{
																		"id": "save-span",
																		"component": "nc-translate",
																		"attribute": {
																			"hdr": "hdr.work_center.button.save"
																		}
																	}
																]
															}
														]
													}
												]
											},
											{
												"component": "nc-row",
												"attribute": {
													"class": ["nc-margin-right"]
												},
												"element": [
													{
														"component": "nc-col",
														"attribute": {
															"width": "12em"
														},
														"element": [
															{
																"component": "nc-label-input",
																"text": "Finished",
																"attribute": {
																	"disabled-": "(!rec.current.can_start || rec.current.started_amount < 1) && rec.current.started_amount >= rec.current.produced_amount + rec.current.failed_amount && rec.focus_field === ''",
																	":disabled": "rec.current.unproductive !== '' && rec.focus_field === '' || !rec.current.enterable",
																	":input-class": "rec.current.started_amount > 0 && rec.current.produced_amount > 0 && rec.current.started_amount < rec.current.produced_amount + rec.current.failed_amount ? 'not-valid-input' : ''",
																	":horizontal": "true",
																	"label-style": "width: 7em; text-align: right;",
																	"v-on:change": "fixAmount()",
																	"v-on:focus": "rec.focus_field = 'produced_amount'",
																	"v-on:blur": "amountAndInfo()",
																	"model": "rec.current.produced_amount"
																}
															}
														]
													},
													{
														"component": "nc-col",
														"attribute": {
															"width": "13em",
															"class": ["nc-margin-right"]
														},
														"element": [
															{
																"component": "nc-label-input",
																"text": "Failed",
																"attribute": {
																	"disabled-": "(!rec.current.can_start || rec.current.started_amount < 1) && rec.current.started_amount >= rec.current.produced_amount + rec.current.failed_amount && rec.focus_field === ''",
																	":disabled": "rec.current.unproductive !== '' && rec.focus_field === '' || !rec.current.enterable",
																	":input-class": "rec.current.started_amount > 0 && rec.current.failed_amount > 0 && rec.current.started_amount < rec.current.produced_amount + rec.current.failed_amount ? 'not-valid-input' : ''",
																	":horizontal": "true",
																	"label-style": "width: 8em; text-align: right;",
																	"v-on:change": "fixAmount()",
																	"v-on:focus": "rec.focus_field = 'failed_amount'",
																	"v-on:blur": "amountAndInfo()",
																	"model": "rec.current.failed_amount"
																}
															}
														]
													},
													{
														"component": "nc-col",
														"attribute": {
															"width": "auto"
														},
														"element": [
															{
																"component": "nc-input",
																"text": "Done before",
																"attribute": {
																	"class": ["nc-disabled-input-dark"],
																	":disabled": "true",
																	":horizontal": "true",
																	"v-show": "true",
																	"label-style": "width: 7em; text-align: right;",
																	"model": "rec.current.calc.done_info"
																}
															}
														]
													}
												]
											},
											{
												"component": "nc-row",
												"attribute": {
													"class": ["nc-margin-right"]
												},
												"element": [
													{
														"component": "nc-col",
														"attribute": {
															"width": "auto"
														},
														"element": [
															{
																"component": "nc-label-input",
																"text": "Notes",
																"attribute": {
																	"disabled-": "(rec.current.unproductive !== '' || rec.current.started_amount === '' || rec.current.started_amount < 0) && rec.focus_field === ''",
																	":disabled": "rec.current.unproductive !== '' && rec.focus_field === '' || !rec.current.enterable",
																	":horizontal": "true",
																	"label-style": "width: 7em; text-align: right;",
																	"v-on:blur": "amountAndInfo()",
																	"model": "rec.current.info",
																	"class": ["nc-margin-right"]
																}
															}
														]
													}
												]
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"id": "run_person",
											"width": "8em",
											"class": ["nc-align-top", "nc-end-h"]
										},
										"element": [
											{
												"component": "nc-row",
												"attribute": {
													"v-for": "button in arr.person_state_run_button",
													"height": "2.7em",
													"class": ["nc-center-v", "nc-end-h"]
												},
												"element": [
													{
														"component": "nc-button",
														"attribute": {
															":id": "'run-'+button.value",
															"v-on:click": "clickButton('run', button.value)",
															":disabled": "!rec.current.can_run || button.start_run && !rec.current.can_run",
															"class": ["nc-button-wide", "toggle"],
															":style": "{'--button-color': button.color, 'margin-right': '0px'}",
															":class": "button.value === rec.person_state ? 'active' : ''"
														},
														"element": [
															{
																":id": "'run-icon-'+button.value",
																"component": "nc-icon",
																"attribute": {
																	":icon": "button.icon",
																	"style": "align: left;"
																}
															},
															{
																":id": "'run-span'+button.value",
																"component": "nc-span",
																"text": "{{button.show}}"
															}
														]
													}
												]
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"id": "run_machine",
											"width": "9em",
											"class": ["nc-align-top"]
										},
										"element": [
											{
												"component": "nc-row",
												"attribute": {
													"height": "2.7em",
													"class": ["nc-center-v"]
												},
												"element": [
													{
														"component": "nc-button",
														"attribute": {
															"id": "stop_work-button",
															":disabled": "(rec.current.can_run && (rec.person_state === 'edit' && rec.machine_state !== 'running')) || (!rec.current.can_run && !rec.current.can_start)",
															"v-on:click": "clickButton(rec.current.can_run ? 'stop' : (rec.current.started_amount > 0 && rec.current.produced_amount === 0 && rec.current.failed_amount === 0 ? 'end' : 'finish'))",
															"class": ["nc-button-wide"]
														},
														"element": [
															{
																"id": "stop_work-icon",
																"component": "nc-icon",
																"attribute": {
																	":icon": "rec.current.can_run ? rec.button_icon.stop : (rec.current.started_amount > 0 && rec.current.produced_amount === 0 && rec.current.failed_amount === 0 ? rec.button_icon.end : rec.button_icon.finish)",
																	"style": "align: center",
																	"class": "not-valid-input"
																}
															},
															{
																"id": "stop_work-translate",
																"component": "nc-translate",
																"attribute": {
																	":model": "rec.current.can_run ? 'hdr.work_center.button.stop' : (rec.current.started_amount > 0 && rec.current.produced_amount === 0 && rec.current.failed_amount === 0 ? 'hdr.work_center.button.end' : 'hdr.work_center.button.finish')"
																}
															}
														]
													}
												]
											},
											{
												"component": "nc-row",
												"attribute": {
													"height": "2.7em",
													"style": "margin-right: 0.35em;",
													"class": ["nc-center-v"]
												},
												"element": [
													{
														"component": "nc-dropdown",
														"attribute": {
															":disabled": "!rec.current.can_run",
															"v-on:click": "rec.run_machine_idx = nc.recordArrayIndex(arr.run_machine, 'value', rec.run_machine) || 0",
															":horizontal": "true",
															"model": "rec.run_machine"
														}
													}
												]
											},
											{
												"component": "nc-row",
												"attribute": {
													"height": "2.7em",
													"class": ["nc-center-v"]
												},
												"element": [
													{
														"component": "nc-button",
														"attribute": {
															"id": "run_machine-button",
															"v-on:click": "clickButton('run_machine', rec.run_machine)",
															":disabled": "!rec.current.can_run",
															"class": ["nc-button-wide", "toggle"],
															":class": "rec.machine_state !== '' && rec.run_machine === rec.machine_state ? 'active' : ''",
															":style": "{'--button-color': arr.run_machine[rec.run_machine_idx]?.color}"
														},
														"element": [
															{
																"id": "run_machine-icon",
																"component": "nc-icon",
																"attribute": {
																	":icon": "arr.run_machine[rec.run_machine_idx]?.icon",
																	"style": "align: left;"
																}
															},
															{
																"id": "run_machine-span",
																"component": "nc-span",
																"text": "{{arr.run_machine[rec.run_machine_idx]?.show}}"
															}
														]
													}
												]
											}
										]
									},
									{
										"component": "nc-row",
										"attribute": {
											"height": "0.5em"
										},
										"element": [
											{
												"component": "nc-line"
											}
										]
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"attribute": {
							"id": "find"
						},
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "22em",
									"class": ["nc-margin-right"]
								},
								"element": [
									{
										"component": "nc-label-dropdown",
										"text": "Resource",
										"attribute": {
											":horizontal": "true",
											"label-style": "width: 6em;",
											"model": "rec.resource",
											"v-on:change": "update('work')"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto"
								},
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "auto",
											"class": ["nc-margin-right"]
										},
										"element": [
											{
												"component": "nc-label-input",
												"text": "Find",
												"attribute": {
													":horizontal": "true",
													"label-style": "width: 4em; text-align: right;",
													"model": "rec.find_text",
													"v-on:change": "findChanged(rec.find_text)"
												}
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "2em",
											"class": ["nc-center-v", "nc-margin-right"]
										},
										"element": [
											{
												"component": "nc-button",
												"attribute": {
													"id": "clear_find",
													"size": "tiny",
													"style": "width: 2em; padding-left: 0.3em",
													"v-on:click": "findChanged(null, 'clear_find')"
												},
												"element": [
													{
														"component": "nc-icon",
														"attribute": {
															"icon": "backspace"
														}
													}
												]
											}
										]
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto",
									"class": ["nc-space-evenly"]
								},
								"element": [
									{
										"component": "nc-checkbox",
										"text": "Create schedule",
										"attribute": {
											"model": "rec.create_schedule",
											"v-on:click": "update(null, null, true)"
										}
									},
									{
										"component": "nc-checkbox",
										"text": "Show sales",
										"attribute": {
											"model": "rec.virtual_production_order",
											"v-on:click": "refresh()"
										}
									},
									{
										"component": "nc-checkbox",
										"text": "Done",
										"attribute": {
											"model": "rec.show_done",
											"v-on:click": "refresh()"
										}
									},
									{
										"component": "nc-checkbox",
										"text": "Active",
										"attribute": {
											"model": "rec.show_active",
											"v-on:click": "refresh()"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"v-if": "false",
									"class": ["nc-end-h"],
									"width": "2.3em"
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											"id": "open-button",
											"v-on:click": "update(null, null, true)",
											"class": ["basic", "small", "circular"],
											"style": "z-index: 1; height: 28px; width: 22px; min-width: 22px; padding-left: 7px; padding-top: 7px;"
										},
										"element": [
											{
												"component": "nc-icon",
												"attribute": {
													"icon": ["sync"],
													"style": "background-color: white"
												}
											}
										]
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-grid",
								"attribute": {
									"id": "work",
									":doesExternalFilterPass": "doesExternalFilterPass",
									":height": "rec.tab_open ? rec.info_open ? 'calc(100vh - 49em)' : 'calc(100vh - 39em)' : rec.info_open ? 'calc(100vh - 45em)' : 'calc(100vh - 36em)'",
									":isExternalFilterPresent": "isExternalFilterPresent",
									":style": "{width: '100%', 'min-height': '8em'}",
									"model": "grid.work",
									"v-on:grid-row-clicked": "gridRowClicked",
									"v-on:grid-row-double-clicked": "gridRowDoubleClicked"
								}
							}
						]
					},
					{
						"component": "nc-row",
						"attribute": {
							"v-show": "rec.document_data && rec.document_data.viewer_show_type !== 'fullpage'",
							"class": ["nc-container-margin-top"]
						},
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto",
									"height": "18em",
									"v-if": "!rec.show_work_phase_wide",
									":style": "{'min-width': rec.tab_document === 'storage_map' ? '45%' : '24em'}",
									"class": ["nc-item-margin-top", "nc-margin-right"]
								},
								"element": [
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-tab",
												"attribute": {
													"class": ["nc-tab-work-center"],
													":style": "{width: '100%'}",
													"model": "rec.tab_material",
													"v-on:change": "setGrid('product_material')",
													"v-on:dblclick": "setGrid('product_material', true)"
												}
											}
										]
									},
									{
										"component": "nc-row",
										"attribute": {
											":style": "{width: '100%', height: '18em'}"
										},
										"element": [
											{
												"component": "nc-grid",
												"attribute": {
													"id": "product_material",
													"model": "grid.product_material",
													"v-if": "rec.tab_material === 'material_estimated' || rec.tab_material === 'collect'",
													"v-on:grid-row-clicked": "gridRowClicked",
													"v-on:grid-row-double-clicked": "gridRowDoubleClicked"
												}
											},
											{
												"component": "nc-grid",
												"attribute": {
													"id": "product_material_actual",
													"model": "grid.product_material_actual",
													"v-if": "rec.tab_material === 'material_actual'",
													"v-on:grid-row-clicked": "gridRowClicked",
													"v-on:grid-row-double-clicked": "gridRowDoubleClicked"
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto",
									"height": "18em",
									"v-if": "rec.tab_material === 'collect'",
									"class": ["nc-item-margin-top", "nc-margin-right"]
								},
								"element": [
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-tab",
												"attribute": {
													"class": ["nc-tab-work-center"],
													":style": "{width: '100%'}",
													"model": "rec.tab_collect",
													"v-on:change": "setGrid('product_material')",
													"v-on:dblclick": "setGrid('product_material', true)"
												}
											}
										]
									},
									{
										"component": "nc-grid",
										"attribute": {
											"id": "stock_location",
											"height": "18em",
											"model": "grid.stock_location"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto",
									"height": "18em",
									"v-if": "!rec.show_work_phase_wide",
									"style": "min-width: 24em;",
									"class": ["nc-item-margin-top", "nc-margin-right"]
								},
								"element": [
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-tab",
												"attribute": {
													"class": ["nc-tab-work-center"],
													":style": "{width: '100%'}",
													"model": "rec.tab_document",
													"v-on:change": "openDocumentPreview()"
												}
											}
										]
									},
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-droparea",
												"attribute": {
													"icon": "",
													":clickable": "false",
													"v-show": "rec.tab_document !== 'storage_map'",
													":style": "{width: '100%', 'margin-top': '0px', height: 'calc(18em + 4px)'}",
													"v-on:import-file": "importFile"
												},
												"element": [
													{
														"component": "nc-grid",
														"attribute": {
															"id": "document",
															":style": "{width: '100%', 'margin-top': '0px', 'padding-bottom': '1px', height: '18em'}",
															"model": "grid.document",
															"v-on:grid-row-clicked": "gridRowClicked",
															"v-on:grid-row-double-clicked": "gridRowDoubleClicked"
														}
													}
												]
											},
											{
												"component": "nc-rect",
												"attribute": {
													"v-show": "rec.tab_document === 'storage_map'",
													"style": ["margin: 1px; overflow: hidden;"]
												},
												"element": [
													{
														"component": "nc-svg-map",
														"attribute": {
															":highlight": "mapSelected",
															"style": "height: 20.85em; margin-top: -3em;",
															"svg": "img/storage-map.svg",
															"v-model:hover": "mapHover",
															"v-on:click": "storageMapToggleSelected($event)",
															"v-on:dblclick": "storageMapDoubleClick($event)"
														}
													}
												]
											}
										]
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto",
									"height": "18em",
									"style": "min-width: 35em;",
									"class": ["nc-item-margin-top"],
									"v-show": "rec.tab_document !== 'storage_map'"
								},
								"element": [
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-tab",
												"attribute": {
													"class": ["nc-tab-work-center"],
													"style": "width: 100%",
													"model": "rec.tab_work_phase",
													"v-on:change": "setGrid('work_phase')",
													"v-on:dblclick": "setGrid('work_phase', true)"
												}
											}
										]
									},
									{
										"component": "nc-row",
										"attribute": {
											"class": ["nc-end-h"],
											"style": "margin-top: -2.2em;"
										},
										"element": [
											{
												"component": "nc-checkbox",
												"text": "Wide",
												"attribute": {
													"model": "rec.show_work_phase_wide"
												}
											}
										]
									},
									{
										"component": "nc-row",
										"element": [
											{
												"component": "nc-grid",
												"attribute": {
													"id": "work_phase",
													"model": "grid.work_phase",
													"v-if": "rec.tab_work_phase === 'work_phase_estimated'",
													"v-on:grid-row-clicked": "gridRowClicked",
													"v-on:grid-row-double-clicked": "gridRowDoubleClicked",
													"style": ["width: 100%", "height: 18em"]
												}
											},
											{
												"component": "nc-grid",
												"attribute": {
													"id": "work_phase_actual",
													"model": "grid.work_phase_actual",
													"v-if": "rec.tab_work_phase === 'work_phase_actual'",
													"v-on:grid-row-clicked": "gridRowClicked",
													"v-on:grid-row-double-clicked": "gridRowDoubleClicked",
													"style": ["width: 100%", "height: 18em"]
												}
											},
											{
												"component": "nc-grid",
												"attribute": {
													"id": "work_phase_actual_open",
													"model": "grid.work_phase_actual_open",
													"v-if": "rec.tab_work_phase === 'work_phase_actual_open'",
													"v-on:grid-row-clicked": "gridRowClicked",
													"v-on:grid-row-double-clicked": "gridRowDoubleClicked",
													"style": ["width: 100%", "height: 18em"]
												}
											},
											{
												"component": "nc-rect",
												"attribute": {
													"v-show": "rec.tab_work_phase === 'document'",
													"style": ["height: 18em", "margin: 1px", "overflow: hidden;"]
												},
												"element": [
													{
														"component": "nc-document-preview",
														"attribute": {
															"id": "nc-document-preview-canvas",
															":name": "rec.document_name",
															":loadable": "rec.document_loadable",
															":passwordCallback": "passwordCallback",
															":src": "rec.document_data",
															":viewStyle": "rec.document_style_preview",
															"v-on:dblclick": "documentPreviewDoubleClick"
														}
													}
												]
											}
										]
									}
								]
							}
						]
					}
				]
			}
		]
	}
}
