Skip to content

Commit

Permalink
Merge pull request #13 from lighthouse-na/main
Browse files Browse the repository at this point in the history
Fork Sync: Update from parent repository
  • Loading branch information
github-actions[bot] authored Apr 5, 2024
2 parents 3c5b9ad + a9908b9 commit 4376335
Show file tree
Hide file tree
Showing 8 changed files with 606 additions and 35 deletions.
29 changes: 29 additions & 0 deletions app/Livewire/System/Jcps/JCPCreateForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,40 @@

class JCPCreateForm extends Component
{
public $currentPage = 1;

public $positionTitle = '';
public $jobGrade = '';
public $jobPurpose = '';
public $isActive = '';

// Page information
public $pages = [
1 => [
'title' => 'Job Competency Profile Information',
'description' => 'Make sure the information you enter coresponds to the Job Description.',
],
2 => [
'title' => 'Prerequisite Information',
'description' => 'Enter the information regarding required qualifications,certifications and/or licenses.',
],
3 => [
'title' => 'Skills Information',
'description' => 'Enter the information regarding required skills and abilities.',
],

];

public function nextPage()
{
$this->currentPage++;
}

public function previousPage()
{
$this->currentPage--;
}

public function save()
{
jcp::create(
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/action-section.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</x-section-title>

<div class="mt-5 md:mt-0 md:col-span-2">
<div class="px-4 py-5 sm:p-6 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
<div class="px-4 py-5 sm:p-6 bg-white dark:bg-gray-800 border sm:rounded-lg">
{{ $content }}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/form-section.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

<div class="mt-5 md:mt-0 md:col-span-2">
<form wire:submit="{{ $submit }}">
<div class="px-4 py-5 bg-white dark:bg-gray-800 sm:p-6 shadow {{ isset($actions) ? 'sm:rounded-tl-md sm:rounded-tr-md' : 'sm:rounded-md' }}">
<div class="px-4 py-5 bg-white border dark:bg-gray-800 sm:p-6 {{ isset($actions) ? 'sm:rounded-tl-md sm:rounded-tr-md' : 'sm:rounded-lg' }}">
<div class="grid grid-cols-6 gap-6">
{{ $form }}
</div>
</div>

@if (isset($actions))
<div class="flex items-center justify-end px-4 py-3 bg-gray-50 dark:bg-gray-800 text-end sm:px-6 shadow sm:rounded-bl-md sm:rounded-br-md">
<div class="flex items-center justify-end px-4 py-3 bg-gray-50 dark:bg-gray-800 text-end sm:px-6 border sm:rounded-bl-md sm:rounded-br-lg">
{{ $actions }}
</div>
@endif
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/input.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@props(['disabled' => false])

<input {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm']) !!}>
<input {{ $disabled ? 'disabled' : '' }} {!! $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-fuchsia-500 dark:focus:border-fuchsia-600 focus:ring-fuchsia-500 dark:focus:ring-fuchsia-600 rounded-md shadow-sm']) !!}>
2 changes: 1 addition & 1 deletion resources/views/directories/jcp/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ __('Create JCP') }}
</h2>
</x-slot>
<div class="py-6 px-6">
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<div class="">
@livewire('system.jcps.j-c-p-create-form')
</div>
Expand Down
114 changes: 85 additions & 29 deletions resources/views/livewire/system/jcps/j-c-p-create-form.blade.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,91 @@
<form class="max-w-sm">
<div class="grid grid-cols-2 gap-3">
<div class="section border rounded-lg p-3">
<div class="mb-5">
<label for="email" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Your email</label>
<input type="email" id="email" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="[email protected]" required />
</div>
<div class="mb-5">
<label for="password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Your password</label>
<input type="password" id="password" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required />
</div>
<x-form-section submit="createJCPInformation">
<x-slot name="title">
{{ $pages[$currentPage]['title'] }}
</x-slot>

<x-slot name="description">
{{$pages[$currentPage]['description']}}
</x-slot>

<x-slot name="form">
@if ($currentPage === 1)

<!-- Profile Photo -->


<!-- Name -->
<div class="col-span-6 sm:col-span-4">
<x-label for="position_title" value="{{ __('Position Title') }}" />
<x-input id="position_title" type="text" class="mt-1 block w-full" wire:model="state.position_title" required autocomplete="position_title" />
<x-input-error for="position_title" class="mt-2" />


</div>
<div class="col-span-6 sm:col-span-4">
<x-label for="duty_station" value="{{ __('Duty Station') }}" />
<x-input id="duty_station" type="text" class="mt-1 block w-full" wire:model="state.duty_station" required autocomplete="duty_station" />
<x-input-error for="duty_station" class="mt-2" />


</div>
<div class="section border rounded-lg p-3 mb-3">
<div class="mb-5">
<label for="email" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Your email</label>
<input type="email" id="email" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="[email protected]" required />
</div>
<div class="mb-5">
<label for="password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Your password</label>
<input type="password" id="password" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required />
</div>
<div class="flex items-start mb-5">
<div class="flex items-center h-5">
<input id="remember" type="checkbox" value="" class="w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-blue-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800" required />
</div>
<label for="remember" class="ms-2 text-sm font-medium text-gray-900 dark:text-gray-300">Remember me</label>
</div>
<div class="col-span-6 sm:col-span-4">
<x-label for="job_grade" value="{{ __('Job Grade') }}" />
<select id="job_grade" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-fuchsia-500 focus:border-fuchsia-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-fuchsia-500 dark:focus:border-fuchsia-500">
<option selected>Choose the job grade.</option>
<option value="a1">A1</option>
<option value="a2">A2</option>
<option value="a3">A3</option>
<option value="a4">A4</option>
<option value="b1">B1</option>
<option value="b2">B2</option>
<option value="b3">B3</option>
<option value="b4">B4</option>
<option value="bu">BU</option>
<option value="c1">C1</option>
<option value="c2">C2</option>
<option value="c3">C3</option>
<option value="c4">C4</option>
<option value="cu">CU</option>
</select>
</div>

<!-- Job Purpose -->
<div class="col-span-6 sm:col-span-4">
<x-label for="job_prupose" value="{{ __('Job Purpose') }}" />
<textarea id="job_purpose" rows="4" class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-fuchsia-500 focus:border-fuchsia-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-fuchsia-500 dark:focus:border-fuchsia-500" placeholder="Write your thoughts here..."></textarea>
</div>

<div class="col-span-6 sm:col-span-4">
<label class="inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer">
<div class="relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-fuchsia-300 dark:peer-focus:ring-fuchsia-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-fuchsia-600"></div>
<span class="ms-3 text-sm font-medium text-gray-900 dark:text-gray-300">JCP Active</span>
</label>


</div>
@endif

</x-slot>

<x-slot name="actions">
@if ($currentPage === 1)

@else
<x-secondary-button wire:click='previousPage'>
{{ __('Previous') }}
</x-button>
@endif

</div>
@if($currentPage === count($pages))
<x-button wire:click='submit'>
{{ __('Register JCP') }}
</x-button>
@else
<x-secondary-button wire:click='nextPage'>
{{ __('Next') }}
</x-button>

<button type="submit" class="absolute right-6 bottom-6 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Submit</button>
</form>
@endif
</x-slot>
</x-form-section>
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
} ?>
<?php unset($__defined_vars); ?>

<input <?php echo e($disabled ? 'disabled' : ''); ?> <?php echo $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm']); ?>>
<input <?php echo e($disabled ? 'disabled' : ''); ?> <?php echo $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-fuchsia-500 dark:focus:border-fuchsia-600 focus:ring-fuchsia-500 dark:focus:ring-fuchsia-600 rounded-md shadow-sm']); ?>>
<?php /**PATH /home/hubert/Desktop/lighthouse/projects/skillharbor-open/resources/views/components/input.blade.php ENDPATH**/ ?>
Loading

0 comments on commit 4376335

Please sign in to comment.