#2220 points module (rewrite the sms verification module) (#713)

* #2300 Mobile App Fixes

* #2245 Add points-module as payment method

* #2245 Add points-module as payment method

* #2220 points module

* #2220 points module (rewrite the sms verification module)

* #2312 [profile-module] Can't update profile detail

* #2220 points module

* #2220 points module (rewrite the sms verification module) !4

* remove command prompt
This commit is contained in:
Dia Shalabi 2020-10-14 11:52:03 +03:00 committed by GitHub
parent cf17c3c205
commit 803b3c3d80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 40 additions and 4 deletions

View File

@ -24,4 +24,11 @@ if (!function_exists('get_buyables'))
function get_buyables() {
return dispatch_now(new GetBuyables());
}
}
if (!function_exists('auth_id_if_null'))
{
function auth_id_if_null($userId) {
return $userId ?: auth()->id();
}
}

View File

@ -114,4 +114,10 @@
}
}
}
#nav-details {
.birthday-field .input-group-addon {
display: none;
}
}
}

View File

@ -55,6 +55,9 @@ return [
'register_type' => [
'name' => 'Register Type'
],
'birthday' => [
'name' => 'Birthday'
],
'identification_number' => [
'name' => 'Identification Number'
],

View File

@ -96,6 +96,7 @@
</div>
</div>
</div>
{{ userForm.close()|raw }}
</div>
</div>
<div class="tab-pane fade" id="nav-details" role="tabpanel"
@ -140,15 +141,25 @@
{{ profileForm.fields.land_phone.input|raw }}
</div>
</div>
<div class="col-md-12">
<div class="form-group birthday-field">
<label class="control-label font-weight-bold">
{{ trans("visiosoft.module.profile::field.birthday.name") }}
</label>
{{ profileForm.fields.birthday.input|raw }}
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label class="control-label font-weight-bold">{{ trans("visiosoft.module.profile::field.register_type.name") }}</label>
<label class="control-label font-weight-bold">
{{ trans("visiosoft.module.profile::field.register_type.name") }}
</label>
{{ profileForm.fields.register_type.input|raw }}
</div>
</div>
<div class="col-md-12 text-right">
<div class="form-group d-flex align-items-center justify-content-end">
{{ addBlock('profile/detail/profile-detail-form/actions', {'user': user})|raw }}
{{ addBlock('profile/detail/profile-detail-form/actions')|raw }}
{{ profileForm.actions|raw }}
</div>

View File

@ -13,6 +13,7 @@ class ProfileFormBuilder extends FormBuilder
'office_phone',
'land_phone',
'identification_number',
'birthday',
'register_type'
];

View File

@ -21,6 +21,7 @@ class ProfileFormHandler
'office_phone' => $builder->getPostValue('office_phone'),
'land_phone' => $builder->getPostValue('land_phone'),
'identification_number' => $builder->getPostValue('identification_number'),
'birthday' => $builder->getPostValue('birthday'),
'register_type' => $builder->getPostValue('register_type'),
];

View File

@ -3,11 +3,9 @@
use Anomaly\Streams\Platform\Assignment\AssignmentModelTranslation;
use Anomaly\Streams\Platform\Assignment\Contract\AssignmentRepositoryInterface;
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
use Anomaly\Streams\Platform\Entry\EntryTranslationsModel;
use Anomaly\Streams\Platform\Field\Contract\FieldRepositoryInterface;
use Anomaly\Streams\Platform\Field\FieldModelTranslation;
use Anomaly\Streams\Platform\Stream\Contract\StreamRepositoryInterface;
use Anomaly\Streams\Platform\Stream\StreamModelTranslation;
use Visiosoft\LocationModule\Country\CountryModel;
class UsersFieldsSeeder extends Seeder
@ -144,6 +142,15 @@ class UsersFieldsSeeder extends Seeder
'separator' => ':',
]
],
14 => [
'name' => trans('visiosoft.module.profile::field.birthday.name'),
'slug' => 'birthday',
'type' => 'anomaly.field_type.datetime',
'config' => [
"mode" => "date",
"picker" => true,
]
],
];
foreach ($customFields as $customField) {