ketinggalan konflik
This commit is contained in:
@@ -93,22 +93,6 @@ export default function Detail() {
|
||||
const [specialisOptions, setSpecialisOptions] = useState([
|
||||
{ value: '-', label: '-' }
|
||||
]);
|
||||
useEffect(() => {
|
||||
axios.get('service-member/'+1)
|
||||
.then((response) => {
|
||||
setServiceOptions(response.data);
|
||||
}).catch((error) => {
|
||||
console.error('Error fetching ICD options:', error);
|
||||
});
|
||||
|
||||
axios.get('specialis')
|
||||
.then((response) => {
|
||||
setSpecialisOptions(response.data);
|
||||
}).catch((error) => {
|
||||
console.error('Error fetching ICD options:', error);
|
||||
});
|
||||
|
||||
}, []);
|
||||
const [serviceCode, setServiceCode] = useState<string>("");
|
||||
const [idSpecialities, setIdSpecialities] = useState("");
|
||||
const [inputDppj, setInputDppj] = useState("");
|
||||
@@ -199,6 +183,24 @@ function submitRequestFinalLog() {
|
||||
});
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (!requestLog?.id_member) return
|
||||
axios.get('service-member/'+ (requestLog?.id_member ?? null))
|
||||
.then((response) => {
|
||||
setServiceOptions(response.data);
|
||||
}).catch((error) => {
|
||||
console.error('Error fetching ICD options:', error);
|
||||
});
|
||||
|
||||
axios.get('specialis')
|
||||
.then((response) => {
|
||||
setSpecialisOptions(response.data);
|
||||
}).catch((error) => {
|
||||
console.error('Error fetching ICD options:', error);
|
||||
});
|
||||
|
||||
}, [requestLog?.id_member]);
|
||||
|
||||
const updateApproval = async () => {
|
||||
setSubmitLoading(true);
|
||||
axios
|
||||
|
||||
@@ -35,6 +35,10 @@ export type DetailFinalLogType = {
|
||||
id : number,
|
||||
code : string,
|
||||
member_id : string,
|
||||
id_member : string,
|
||||
service_code : string,
|
||||
specialitiesID : any,
|
||||
dppj : any,
|
||||
invoice_no : string,
|
||||
billing_no : string,
|
||||
provider : string,
|
||||
|
||||
@@ -296,10 +296,10 @@ export default function DetailRequestFinalLog() {
|
||||
>([])
|
||||
|
||||
useEffect(() => {
|
||||
if (!requestLog?.id && !Log_id) return
|
||||
if (!requestLog?.id_member) return
|
||||
|
||||
axios
|
||||
.get('service-member/' + requestLog?.id_member)
|
||||
.get('service-member/' + (requestLog?.id_member ?? null))
|
||||
.then((res) => setServiceOptions(res.data))
|
||||
.catch(console.error)
|
||||
|
||||
@@ -307,7 +307,7 @@ export default function DetailRequestFinalLog() {
|
||||
.get('specialis')
|
||||
.then((res) => setSpecialisOptions(res.data))
|
||||
.catch(console.error)
|
||||
}, [requestLog?.id, Log_id])
|
||||
}, [requestLog?.id_member])
|
||||
|
||||
|
||||
const [serviceCode, setServiceCode] = useState<string>('')
|
||||
|
||||
Reference in New Issue
Block a user