Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1498 Переглядів

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 

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
січ. 25
940
1
лист. 24
1521
0
лист. 24
1821
1
вер. 24
2209
3
груд. 23
6143