parent
b01fe050d2
commit
4ef1b7abe8
@ -38,7 +38,8 @@
|
||||
data_loaded = true;
|
||||
original_data = Object.assign(original_data, data);
|
||||
editable = Object.assign(editable, original_data);
|
||||
console.log(editable.address);
|
||||
editable.groups = editable.groups.map((g) => g.id);
|
||||
original_data.groups = original_data.groups.map((g) => g.id);
|
||||
editable.address_checked = editable.address.address1 !== null;
|
||||
original_data.address_checked = editable.address.address1 !== null;
|
||||
});
|
||||
@ -56,6 +57,7 @@
|
||||
$: iszipcodevalid = editable.address?.postalcode?.trim().length !== 0;
|
||||
$: iscityvalid = editable.address?.city?.trim().length !== 0;
|
||||
function submit() {
|
||||
//
|
||||
if (data_loaded === true && save_enabled) {
|
||||
Toastify({
|
||||
text: "Contact is being updated...",
|
||||
@ -70,8 +72,6 @@
|
||||
if (editable.email) editable.email = editable.email;
|
||||
if (editable.phone) editable.phone = editable.phone;
|
||||
if (editable.middlename) editable.middlename = editable.middlename;
|
||||
console.log(JSON.stringify(editable));
|
||||
console.log(editable);
|
||||
GroupContactService.groupContactControllerPut(original_data.id, editable)
|
||||
.then((resp) => {
|
||||
Object.assign(original_data, editable);
|
||||
|
@ -88,7 +88,9 @@
|
||||
{:else}
|
||||
<a
|
||||
href="../teams/{g.id}"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{g.name}</a>
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{g.parentGroup.name}
|
||||
>
|
||||
{g.name}</a>
|
||||
{/if}
|
||||
{/each}
|
||||
{:else}no groups{/if}
|
||||
|
Loading…
x
Reference in New Issue
Block a user