#2220 points module

This commit is contained in:
Diatrex 2020-10-09 16:34:40 +03:00
parent 6c77ce4109
commit 15ffa5646b
6 changed files with 180 additions and 158 deletions

View File

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

View File

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

View File

@ -151,7 +151,9 @@
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group"> <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 }} {{ profileForm.fields.register_type.input|raw }}
</div> </div>
</div> </div>

View File

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

View File

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

View File

@ -3,11 +3,9 @@
use Anomaly\Streams\Platform\Assignment\AssignmentModelTranslation; use Anomaly\Streams\Platform\Assignment\AssignmentModelTranslation;
use Anomaly\Streams\Platform\Assignment\Contract\AssignmentRepositoryInterface; use Anomaly\Streams\Platform\Assignment\Contract\AssignmentRepositoryInterface;
use Anomaly\Streams\Platform\Database\Seeder\Seeder; 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\Contract\FieldRepositoryInterface;
use Anomaly\Streams\Platform\Field\FieldModelTranslation; use Anomaly\Streams\Platform\Field\FieldModelTranslation;
use Anomaly\Streams\Platform\Stream\Contract\StreamRepositoryInterface; use Anomaly\Streams\Platform\Stream\Contract\StreamRepositoryInterface;
use Anomaly\Streams\Platform\Stream\StreamModelTranslation;
use Visiosoft\LocationModule\Country\CountryModel; use Visiosoft\LocationModule\Country\CountryModel;
class UsersFieldsSeeder extends Seeder class UsersFieldsSeeder extends Seeder
@ -28,6 +26,7 @@ class UsersFieldsSeeder extends Seeder
AssignmentModelTranslation $assignmentModelTranslation AssignmentModelTranslation $assignmentModelTranslation
) )
{ {
if ($this->command->confirm('This command will remove the old custom fields from the users table! Are you sure you want to continue?')) {
$namespace = 'users'; $namespace = 'users';
$locked = 0; $locked = 0;
$stream = $streamRepository->findBySlugAndNamespace('users', 'users'); $stream = $streamRepository->findBySlugAndNamespace('users', 'users');
@ -144,6 +143,15 @@ class UsersFieldsSeeder extends Seeder
'separator' => ':', 'separator' => ':',
] ]
], ],
14 => [
'name' => 'Birthday',
'slug' => 'birthday',
'type' => 'anomaly.field_type.datetime',
'config' => [
"mode" => "date",
"picker" => true,
]
],
]; ];
foreach ($customFields as $customField) { foreach ($customFields as $customField) {
@ -191,3 +199,4 @@ class UsersFieldsSeeder extends Seeder
} }
} }
} }
}