Ir al contenido
Menú
Se marcó esta pregunta
1611 Vistas

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 

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
ago 25
164
0
ene 25
1042
1
nov 24
1881
0
nov 24
2032
1
sept 24
2332