// form/local/report/lead-time/lead-time.js

// nc.callServer(state, "dialog/lead-time", "parameter": {"start_date": state.rec.start_date, "end_date": state.rec.end_date}, callb)

let gridData = ref([])

function callback(ret) {
	if (ret.data && ret.data.ordr) {
		gridData.value = ret.data.ordr.data
	}
}

function update() {
	console.debug('plugin/dialog/report/lead-time - update')
	const param = {
		start_date: state.rec.start_date,
		end_date: state.rec.end_date
	}
	nc.callServer(state, 'query', {
		name: 'form/nc/report/lead-time/grid.json',
		// name: 'form/nc/report/lead-time/init.json',
		parameter: param
	})
	// nc.callServer(state, "query", {"name": "dialog/lead-time/lead-time_grid.json", "parameter": param}, callb)
	// nc.callServer(state, "query", {"name": "dialog/lead-time/lead-time_init.json"}, callb)
}
callback(state)
