On click button change their label in child doctype?

HI everyone, I have trip button in child doctype with each row. I want to change their label from “Start” to “End” whenever the button is clicked.
frappe.ui.form.on('Child Doctype,{
start:function(frm,cdt,cdn){
let row = locals[cdt][cdn];
frm.change_custom_button_type(cdt,cdn,‘Start’, ‘End’, ‘danger’);
}
})

start is button type in doctype.

Try to make two buttons, one for each job, and hide the start button when clicking and show and end button instead and so .on

Thanks Omar!

How I can two buttons in child doctype table?