Add update fields
This commit is contained in:
parent
009a9b1678
commit
38fe258f5c
|
@ -92,9 +92,11 @@ class Api {
|
|||
$member = Member::fromAttributes($attributes);
|
||||
$response = $this->http()->put(self::$url.'/ica/rest/nami/mitglied/filtered-for-navigation/gruppierung/gruppierung/'.$member->group_id.'/'.$member->id, $member->toNami());
|
||||
|
||||
if (!data_get($response->json(), 'id')) {
|
||||
$this->exception('Update failed', $response->json(), $member->toNami());
|
||||
if (data_get($response->json(), 'success') !== true) {
|
||||
$this->exception('Update failed', $member->toNami(), $response->json());
|
||||
}
|
||||
|
||||
return $response->json()['data'];
|
||||
}
|
||||
|
||||
public function membershipsOf($memberId): Collection {
|
||||
|
|
|
@ -80,13 +80,24 @@ class Member extends Model {
|
|||
'eintrittsdatum' => $this->joined_at.'T00:00:00',
|
||||
'version' => $this->version,
|
||||
'beitragsartId' => $this->fee_id,
|
||||
'regionId' => $this->region_id,
|
||||
'regionId' => $this->region_id ?: Region::getNullValue(),
|
||||
'landId' => $this->country_id,
|
||||
'staatsangehoerigkeitId' => $this->nationality_id,
|
||||
'geburtsDatum' => $this->birthday,
|
||||
'geschlechtId' => $this->gender_id ?: Gender::getNullValue(),
|
||||
'gruppierungId' => $this->group_id,
|
||||
'id' => $this->id,
|
||||
'zeitschriftenversand' => $this->send_newspaper,
|
||||
'telefon1' => $this->main_phone ?: '',
|
||||
'telefon2' => $this->mobile_phone ?: '',
|
||||
'telefon3' => $this->work_phone ?: '',
|
||||
'telefax' => $this->fax ?: '',
|
||||
'email' => $this->email ?: '',
|
||||
'emailVertretungsberechtigter' => $this->email_parents ?: '',
|
||||
'geburtsDatum' => $this->birthday.' 00:00:00',
|
||||
'nameZusatz' => $this->further_address ?: '',
|
||||
'konfessionId' => $this->confession_id,
|
||||
'staatsangehoerigkeitText' => $this->other_country ?: '',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class NamiUser implements Authenticatable {
|
|||
}
|
||||
|
||||
public function getNamiGroupId() {
|
||||
return $this->groupid;
|
||||
return $this->api()->findNr($this->mglnr)->group_id;
|
||||
}
|
||||
|
||||
public function getAuthIdentifierName() {
|
||||
|
|
Loading…
Reference in New Issue