fix(donor/details): don't load donations
This commit is contained in:
		| @@ -12,7 +12,6 @@ | ||||
|   $: delete_triggered = false; | ||||
|   $: original_data = {}; | ||||
|   $: editable = {}; | ||||
|   $: current_donations = []; | ||||
|   $: changes_performed = !( | ||||
|     JSON.stringify(original_data) === JSON.stringify(editable) | ||||
|   ); | ||||
| @@ -29,11 +28,6 @@ | ||||
|     isPhoneValidOrEmpty && | ||||
|     ((isAddress1Valid && iszipcodevalid && iscityvalid) || | ||||
|       editable.address_checked === false); | ||||
|   const donation_promise = DonationService.donationControllerGetAll().then( | ||||
|     (val) => { | ||||
|       current_donations = val; | ||||
|     } | ||||
|   ); | ||||
|   const promise = DonorService.donorControllerGetOne(params.donorid).then( | ||||
|     (data) => { | ||||
|       data_loaded = true; | ||||
| @@ -96,7 +90,7 @@ | ||||
| </script> | ||||
|  | ||||
| <ConfirmDonorDeletion bind:modal_open bind:delete_donor /> | ||||
| {#await promise && donation_promise} | ||||
| {#await promise} | ||||
|   {$_("loading-donor-details")} | ||||
| {:then} | ||||
|   <section class="container p-5 select-none"> | ||||
| @@ -206,8 +200,8 @@ | ||||
|       > | ||||
|       <br /> | ||||
|       <span class="font-medium text-gray-700">{$_("donations")}:</span> | ||||
|       {#if current_donations.filter((d) => d.donor.id == editable.id).length > 0} | ||||
|         {#each current_donations.filter((o) => o.donor.id == editable.id) as d} | ||||
|       {#if original_data.donations.length > 0} | ||||
|         {#each original_data.donations as d} | ||||
|           {#if d.responseType === "DISTANCEDONATION"} | ||||
|             <a | ||||
|               href="../donations/{d.id}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user