-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1140 from ColoredCow/master
Production build v0.2.3
- Loading branch information
Showing
35 changed files
with
489 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Modules\Client\Entities; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Country extends Model | ||
{ | ||
protected $table = 'countries'; | ||
|
||
protected $fillable = ['name', 'initials', 'currency', 'currency_symbol']; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Modules\Client\Http\Controllers; | ||
|
||
use Modules\Client\Entities\Country; | ||
use Modules\Client\Http\Requests\CountryRequest; | ||
|
||
class CountryController extends ModuleBaseController | ||
{ | ||
public function store(CountryRequest $request) | ||
{ | ||
$validated = $request->validated(); | ||
$country = Country::create($request->all()); | ||
|
||
return redirect()->back()->with('status', 'Country saved successfully!'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Modules\Client\Http\Requests; | ||
|
||
use Illuminate\Foundation\Http\FormRequest; | ||
|
||
class CountryRequest extends FormRequest | ||
{ | ||
public function rules() | ||
{ | ||
$rules = [ | ||
'name' => 'required|string', | ||
'initials' => 'required|string', | ||
'currency' => 'required|string', | ||
'currency_symbol' => 'nullable|string', | ||
]; | ||
|
||
return $rules; | ||
} | ||
|
||
/** | ||
* Determine if the user is authorized to make this request. | ||
* | ||
* @return bool | ||
*/ | ||
public function authorize() | ||
{ | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
Modules/Client/Resources/views/subviews/client-address-modal.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<div class="modal" id="myModalClientCountry"> | ||
<div class="modal-dialog modal-md"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title">Country Details</h4> | ||
<button type="button" class="close" data-dismiss="modal">×</button> | ||
</div> | ||
<form action="{{route("country.store")}}" method ="POST"> | ||
@csrf | ||
<div class="modal-body"> | ||
<div class="form-group row"> | ||
<label class="col-sm-2 col-form-label">Country<strong class="text-danger">*</strong></label> | ||
<div class="col-sm-4"> | ||
<input type="text" id="name" name="name" class="form-control" placeholder="Country" required> | ||
</div> | ||
<label class="col-sm-2 col-form-label">Initials<strong class="text-danger">*</strong></label> | ||
<div class="col-sm-4"> | ||
<input type="text" id ="initials" name="initials" class="form-control" placeholder="Initials" required> | ||
</div> | ||
</div> | ||
<div class="form-group row"> | ||
<label class="col-sm-2 col-form-label">Currency<strong class="text-danger">*</strong></label> | ||
<div class="col-sm-4"> | ||
<input type="text" id ="currency" name="currency" class="form-control" placeholder="Currency" required> | ||
</div> | ||
<label class="col-sm-2 col-form-label">Symbols</label> | ||
<div class="col-sm-4"> | ||
<select id="currency_symbol" name="currency_symbol" class="form-control"> | ||
@foreach(config('client.currency-symbols') as $key => $value) | ||
<option value="{{ $key }}">{{implode($value)}}</option> | ||
@endforeach | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<input type="submit" class='btn btn-outline-primary' value="Save"> | ||
<button type="button" class="btn btn-outline-danger" data-dismiss="modal">Close</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Modules\HR\Database\Factories; | ||
|
||
use Modules\HR\Entities\Applicant; | ||
use Illuminate\Database\Eloquent\Factories\Factory; | ||
|
||
class HrApplicantsFactory extends Factory | ||
{ | ||
/** | ||
* The name of the factory's corresponding model. | ||
* | ||
* @var string | ||
*/ | ||
protected $model = Applicant::class; | ||
|
||
/** | ||
* Define the model's default state. | ||
* | ||
* @return array | ||
*/ | ||
public function definition() | ||
{ | ||
return [ | ||
'name' => $this->faker->name, | ||
'email' => $this->faker->email, | ||
'phone' => $this->faker->phoneNumber, | ||
'course' => array_rand(config('hr.opportunities.domains')), | ||
'college' => $this->faker->word, | ||
'graduation_year' => $this->faker->year, | ||
'linkedin' => $this->faker->url | ||
]; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Modules/HR/Database/Factories/HrApplicationRoundFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Modules\HR\Database\Factories; | ||
|
||
use Modules\HR\Entities\ApplicationRound; | ||
use Modules\HR\Entities\Application; | ||
use Modules\HR\Entities\Round; | ||
use Modules\User\Entities\User; | ||
use Illuminate\Database\Eloquent\Factories\Factory; | ||
|
||
class HrApplicationRoundFactory extends Factory | ||
{ | ||
/** | ||
* The name of the factory's corresponding model. | ||
* | ||
* @var string | ||
*/ | ||
protected $model = ApplicationRound::class; | ||
|
||
/** | ||
* Define the model's default state. | ||
* | ||
* @return array | ||
*/ | ||
public function definition() | ||
{ | ||
return [ | ||
'hr_application_id' => Application::factory()->create()->id, | ||
'hr_round_id' => Round::first()->id, | ||
'scheduled_person_id' => User::first()->id, | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Modules\HR\Database\Factories; | ||
|
||
use Modules\HR\Entities\Application; | ||
use Modules\HR\Entities\Applicant; | ||
use Modules\HR\Entities\Job; | ||
use Illuminate\Database\Eloquent\Factories\Factory; | ||
|
||
class HrApplicationsFactory extends Factory | ||
{ | ||
/** | ||
* The name of the factory's corresponding model. | ||
* | ||
* @var string | ||
*/ | ||
protected $model = Application::class; | ||
|
||
/** | ||
* Define the model's default state. | ||
* | ||
* @return array | ||
*/ | ||
public function definition() | ||
{ | ||
return [ | ||
'hr_applicant_id' => Applicant::factory()->create()->id, | ||
'hr_job_id' => Job::factory()->create()->id, | ||
'status' => array_rand(config('hr.status')) | ||
]; | ||
} | ||
} |
Oops, something went wrong.