{
	"name": "form/nc/report/production-time/production-time.json",
	"layout": {
		"component": "nc-form",
		"attribute": {
			"id": "production_time"
		},
		"element": [
			{
				"component": "nc-row",
				"element": [
					{
						"component": "nc-col",
						"attribute": {
							"width": "3/7"
						},
						"element": [
							{
								"component": "nc-image",
								"attribute": {
									"width": "190",
									"height": "30",
									":src": "rec.logo_path_local",
									"image-style": "object-fit:contain;"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "1/1"
						},
						"element": [
							{
								"component": "nc-row",
								"attribute": {
									"class": ["nc-center-h"]
								},
								"element": [
									{
										"component": "nc-header",
										"text": "Production time",
										"attribute": {
											"model": "hdr.production_time.production_time",
											"size": "large"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "1/1",
							"height": "",
							"class": ["nc-center-h"]
						},
						"element": [
							{
								"component": "nc-span",
								"text": "{{ dt.formatDate(rec.start_date) + ' - ' + dt.formatDate(rec.end_date) }}"
							}
						]
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"class": ["nc-no-print", "nc-margin-top"]
				},
				"element": [
					{
						"component": "nc-col",
						"attribute": {
							"width": "1/7"
						},
						"element": [
							{
								"component": "nc-label",
								"text": "Time period",
								"attribute": {
									"value": "time_period",
									"hdr": "hdr.production_time.time_period",
									"model": "rec.query_type"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"comment": ", :disabled='rec.query_type !== 'time_period''",
						"attribute": {
							"width": "1/7",
							"class": ["nc-padding-right"]
						},
						"element": [
							{
								"component": "nc-input",
								"attribute": {
									"id": "start_date",
									"end-calendar": "rec.end_date",
									"model": "rec.start_date"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "1/7",
							"class": ["nc-padding-left"]
						},
						"element": [
							{
								"component": "nc-input",
								"attribute": {
									"id": "end_date",
									"model": "rec.end_date",
									"start-calendar": "rec.start_date"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "3/7"
						}
					},
					{
						"component": "nc-col",
						"attribute": {
							"class": ["nc-end-h"],
							"width": "1/7"
						},
						"element": [
							{
								"component": "nc-button",
								"attribute": {
									"type": "submit",
									":class-": "{negative: dt.dateToString(rec.start_date) < dt.dateToString(rec.query_start_date) || dt.dateToString(rec.end_date) > dt.dateToString(rec.query_end_date)}",
									":class": "{negative: rec.start_date < rec.query_start_date || rec.end_date > rec.query_end_date}",
									"primary": "primary",
									"submit": "submit",
									"v-on:click": "callServer('update')"
								},
								"element": [
									{
										"component": "i",
										"attribute": {
											"class": ["far", "fa-sync"]
										}
									},
									{
										"component": "nc-translate",
										"text": "Update",
										"attribute": {
											"model": "hdr.delivery_reliability.update"
										}
									}
								]
							}
						]
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"class": ["nc-no-print", "nc-margin-top"]
				},
				"element": [
					{
						"component": "nc-label",
						"text": "Summary",
						"attribute": {
							"model": "hdr.production_time.summary"
						}
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"class": ["nc-no-print"]
				},
				"element": [
					{
						"component": "nc-grid",
						"attribute": {
							"id": "summary",
							"height": "calc(60vh - 8em)",
							"model": "grid.summary"
						}
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"class": ["nc-no-print"]
				},
				"element": [
					{
						"component": "nc-label",
						"text": "Invoice row",
						"attribute": {
							"model": "hdr.production_time.order_row"
						}
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"class": ["nc-no-print"]
				},
				"element": [
					{
						"component": "nc-grid",
						"attribute": {
							"id": "order_row",
							"height": "calc(20vh - 7em)",
							"model": "grid.order_row"
						}
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"class": ["nc-no-print"]
				},
				"element": [
					{
						"component": "nc-label",
						"text": "Actual work phase",
						"attribute": {
							"model": "hdr.production_time.product_work"
						}
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"class": ["nc-no-print"]
				},
				"element": [
					{
						"component": "nc-grid",
						"attribute": {
							"id": "product_work",
							"height": "calc(20vh - 7em)",
							"model": "grid.product_work"
						}
					}
				]
			}
		]
	}
}
