Hello
I want to send data in my OwlJ component from xml view this is my code
export class OwlSiteMilestoneDashboard extends Component {
setup() {
this.state = useState({
totalAverageSiteMilestone: { value: 0 },
graphData: { value: 0 },
projectManagers: [],
selectedManager: "",
start_date: "",
end_date: "",
});
this.orm = useService("orm");
this.actionService = useService("action");
onWillStart(async () => {
const context = this.props.context || {};
const project_id = context.default_project_id;
const customer_site_id = context.default_customer_site_id;
console.log("Project ID:", context);
console.log("Customer Site ID:", customer_site_id);
if (project_id && customer_site_id) {
this.context = {
project_id: project_id,
customer_site_id: customer_site_id,
};
} else {
this.context = {
project_id: 1, // Default or test value
customer_site_id: 1 // Default or test value
};
}
await this.getData();
await this.fetchTeamLeader();
await this.updateKpiData();
});
onMounted(() => {
this.initializeDatePickers();
});
}
}
how do i get those values in my OwlJ ? any support it will be helpfull
thx