change program
This commit is contained in:
parent
d34fdd946c
commit
6b61b51d53
@ -63,7 +63,10 @@ class CardService
|
||||
$card->username = $form_model->getItem('username');
|
||||
$card->status = $form_model->getItem('status');
|
||||
|
||||
if ($card->card_template_id !== (int)$form_model->getItem('card_template_id')) {
|
||||
if (
|
||||
$card->card_template_id !== (int)$form_model->getItem('card_template_id')
|
||||
or $card->program !== (int)$form_model->getItem('program')
|
||||
) {
|
||||
$card->card_template_id = $form_model->getItem('card_template_id');
|
||||
$cardFile = $this->cardFileService->create($card);
|
||||
if ($cardFile) {
|
||||
@ -110,7 +113,7 @@ class CardService
|
||||
public static function userHasCard(int $userId): bool
|
||||
{
|
||||
$card = Card::where("user_id", $userId)->first();
|
||||
if ($card){
|
||||
if ($card) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user