Generation

time complexityMon, 03 Apr 2023

{record.documents.length ? ( record.documents.some( (i) => i.status === 2 || i.status === 4 ) && ( <> {profile && ButtonConfig[ profile?.user_role ? profile.user_role : profile.account_type ]?.ORDERS?.LOADING_DOCUMENT_VERIFY ? ( <Button1 text="Verify Document" type="blue" fontSize="14px" height="40px" marginBottom="12px" onClick={() => setShowVerifyModal(record)} /> ) : ( "" )} </> ) ) : record.payment_status === PAYMENT_STATUS.PARTIAL_PAYMENT && record.payments.length && record.payments.every((pay) => pay.is_verified === true) ? ( <> {profile && ButtonConfig[ profile?.user_role ? profile.user_role : profile.account_type ]?.ORDERS?.LOADING_DOCUMENT_UPLOAD ? ( <Button1 text="Upload Document" type="blue" fontSize="14px" height="40px" marginBottom="12px" onClick={() => uploadDocumentsHandler(record)} /> ) : ( "" )} </> ) : null}

O(n)

Want to kickstart your project?Use the new AI Studio to create your code