Add group ID to member

This commit is contained in:
philipp lang 2020-07-04 13:07:58 +02:00
parent 6e04bc2de6
commit 1a685ffd40
5 changed files with 6 additions and 2 deletions

View File

@ -143,6 +143,7 @@ class Api {
$member = collect($member)->mapWithKeys(function($value, $key) {
return [ str_replace('entries_', '', $key) => $value ];
});
$member['gruppierungId'] = $groupId;
return $member->toArray();
}

View File

@ -36,6 +36,7 @@ class Member extends Model {
'konfessionId' => 'confession_id',
'geburtsDatum' => 'birthday',
'eintrittsdatum' => 'joined_at',
'gruppierungId' => 'group_id'
];
protected $casts = [];

View File

@ -36,6 +36,7 @@ class PullMemberTest extends TestCase
'confession_id' => ['confession_id', [1, null]],
'birthday' => ['birthday', ['1991-06-20', '1984-01-17']],
'joined_at' => ['joined_at', ['2005-05-01', null]],
'group_id' => ['group_id', [103, 103]],
];
}
@ -54,6 +55,7 @@ class PullMemberTest extends TestCase
'gender_id' => ['gender_id', [19, null]],
'birthday' => ['birthday', ['1991-06-20', '1984-01-17']],
'joined_at' => ['joined_at', ['2005-05-01', null]],
'group_id' => ['group_id', [103, 103]],
];
}

View File

@ -20,7 +20,7 @@
"spitzname": "spitz1",
"landId": 1,
"staatsangehoerigkeitText": "deutsch",
"gruppierungId": 100105,
"gruppierungId": 103,
"mglTypeId": "MITGLIED",
"beitragsart": "Voller Beitrag",
"nachname": "Nach1",

View File

@ -20,7 +20,7 @@
"spitzname": "",
"landId": 1,
"staatsangehoerigkeitText": "",
"gruppierungId": 100105,
"gruppierungId": 103,
"mglTypeId": "MITGLIED",
"beitragsart": "Voller Beitrag",
"nachname": "Nach2",