Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Dev into Main #13

Open
wants to merge 87 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
579c22c
wip: form versions
kiiskila-bcgov Aug 27, 2024
a0dfb75
wip: form field per versions
kiiskila-bcgov Aug 27, 2024
7742a07
wip: form field work
kiiskila-bcgov Sep 13, 2024
e5874e4
wip: fixes to the versioning system for forms
kiiskila-bcgov Sep 17, 2024
7df750e
fix label not showing default
kiiskila-bcgov Sep 17, 2024
b16e8d3
add properties to default form fields
kiiskila-bcgov Sep 17, 2024
c8bc532
Pass field properties properly
kiiskila-bcgov Sep 19, 2024
cef0db0
pass form id directly
kiiskila-bcgov Sep 19, 2024
dff36c9
use presets in validation form fields
kiiskila-bcgov Sep 19, 2024
31a6dfb
deps: bump laravel/pint from 1.15.1 to 1.18.1
dependabot[bot] Sep 24, 2024
8fb3d0f
Auto fill updater info
kiiskila-bcgov Oct 1, 2024
86cfb42
start number of items at 0
kiiskila-bcgov Oct 1, 2024
e163b36
fix creating form versions from scratch
kiiskila-bcgov Oct 1, 2024
a462c4f
show edit or create new based on status
kiiskila-bcgov Oct 1, 2024
a31ccea
duplicate form fields on form replication
kiiskila-bcgov Oct 1, 2024
1ded89a
add form developer role
kiiskila-bcgov Oct 1, 2024
9275d3f
fix displaying versions in list
kiiskila-bcgov Oct 1, 2024
56c7937
wip: add validations to form_fields
kiiskila-bcgov Oct 1, 2024
8ef1510
Merge pull request #3 from bcgov/add-form-fields-for-forms
kiiskila-bcgov Oct 1, 2024
3e526be
re-order migrations causing an issue
kiiskila-bcgov Oct 1, 2024
1ee738a
fix routing issue
kiiskila-bcgov Oct 1, 2024
9b3c0a7
use default create action
kiiskila-bcgov Oct 1, 2024
17c44cb
register the routes
kiiskila-bcgov Oct 1, 2024
081053f
fix reference to components
kiiskila-bcgov Oct 1, 2024
285d59a
fix spelling, Textarea
kiiskila-bcgov Oct 1, 2024
c13b7c7
fix version number in template output
kiiskila-bcgov Oct 2, 2024
6d9493e
fix form title, and ministry
kiiskila-bcgov Oct 2, 2024
3032a3f
wip: adding groups to form version drop down
kiiskila-bcgov Oct 2, 2024
82a278f
remove field group constraint
kiiskila-bcgov Oct 3, 2024
5a126b1
add field group instances
kiiskila-bcgov Oct 3, 2024
e009be8
fix group table name + add constraint
kiiskila-bcgov Oct 3, 2024
747d906
deps: bump laravel/sail from 1.29.1 to 1.34.0
dependabot[bot] Oct 7, 2024
a0637c0
create form data sources
DavidOkulski Oct 7, 2024
29e5049
Updated create user to include roles
DavidOkulski Oct 7, 2024
348234d
Merge pull request #11 from bcgov/dependabot/composer/laravel/sail-1.…
kiiskila-bcgov Oct 10, 2024
9e7d37f
Merge pull request #9 from bcgov/dependabot/composer/laravel/pint-1.18.1
kiiskila-bcgov Oct 10, 2024
354478e
upgrade packages
kiiskila-bcgov Oct 10, 2024
e898474
Merge pull request #14 from bcgov/upgrade-packages
kiiskila-bcgov Oct 10, 2024
80f0c6a
auto recreate pod on successful deployment
kiiskila-bcgov Oct 10, 2024
20c1cd8
Merge pull request #15 from bcgov/auto-deploy-updates
kiiskila-bcgov Oct 10, 2024
247ebe8
Merge pull request #12 from bcgov/form_data_sources
DavidOkulski Oct 10, 2024
8fdcc8c
fix model reference
kiiskila-bcgov Oct 10, 2024
2e474d7
update forms field order
kiiskila-bcgov Oct 11, 2024
755225a
form list updates
kiiskila-bcgov Oct 11, 2024
2bcdbf4
add form program to forms table
kiiskila-bcgov Oct 11, 2024
400cb85
add export to csv function
kiiskila-bcgov Oct 11, 2024
14a711f
fix rendered form search
kiiskila-bcgov Oct 11, 2024
3becc2f
fix 500 error on duplicate form id
kiiskila-bcgov Oct 11, 2024
ff8f765
Merge pull request #16 from bcgov/ADO-2007-bug-fix
kiiskila-bcgov Oct 11, 2024
51c05c8
update db polling to be 10s
kiiskila-bcgov Oct 11, 2024
5ae3111
setup supervisor to run the queue
kiiskila-bcgov Oct 11, 2024
d4303f9
fix permissions for supervisor
kiiskila-bcgov Oct 11, 2024
eb40a61
undo supervisor changes
kiiskila-bcgov Oct 11, 2024
457246d
update gha workflow with more caching
kiiskila-bcgov Oct 11, 2024
7b7fc64
Revert "update gha workflow with more caching"
kiiskila-bcgov Oct 11, 2024
ecaca8b
fix forms to default show all
kiiskila-bcgov Oct 29, 2024
12a42b6
hide preview/generate json on edit page
kiiskila-bcgov Oct 29, 2024
58e3970
wip: save group and field to version
kiiskila-bcgov Oct 29, 2024
8d87ae6
add form field/field group properties
kiiskila-bcgov Oct 29, 2024
002f70d
allow field groups to have form fields
kiiskila-bcgov Oct 29, 2024
b3306b7
fix default items and better hide json output
kiiskila-bcgov Oct 29, 2024
6d35e0d
wip: fix create version from existing
kiiskila-bcgov Oct 29, 2024
2a632f7
update generated text
kiiskila-bcgov Oct 29, 2024
ada62bb
Merge branch 'dev' into form-groups-for-form-versions
kiiskila-bcgov Oct 29, 2024
24ec029
Merge pull request #21 from bcgov/form-groups-for-form-versions
kiiskila-bcgov Oct 29, 2024
c7b3178
fix text area spelling
kiiskila-bcgov Oct 29, 2024
4ba94cb
remove duplicate properties
kiiskila-bcgov Oct 29, 2024
855bc22
allow adding form fields in field groups
kiiskila-bcgov Oct 30, 2024
b731bb2
easy admin reset password
kiiskila-bcgov Oct 30, 2024
3db7825
Add form fields to View mode
kiiskila-bcgov Oct 30, 2024
b67c82c
Add titles to collapsed forms
kiiskila-bcgov Oct 30, 2024
5bfe729
Merge pull request #22 from bcgov/form-group-improvements
kiiskila-bcgov Oct 30, 2024
392f0d6
Update form metadata
DavidOkulski Nov 4, 2024
36f73b5
Add unique constraint to bre rule names, and update links from id to …
brysonjbest Oct 29, 2024
4ebc034
Add filters for searching and organization of BRE views.
brysonjbest Oct 31, 2024
130e8df
Add clickable badges for related fields, rules, and icmcdw fields.
brysonjbest Nov 5, 2024
6e3e078
Added data binding path selector to form fields
DavidOkulski Nov 7, 2024
6f67b28
Updated options for data source path in fields
DavidOkulski Nov 7, 2024
baa3015
Refactor linked badges with DRY principles.
brysonjbest Nov 13, 2024
7914b68
Changes for ADO-2170
saranyaviswam Nov 13, 2024
79931d2
Added form id-title to form table/form version
DavidOkulski Nov 13, 2024
b03c770
Removed Form fields form data sources table
DavidOkulski Nov 13, 2024
a3fd4d5
Merge pull request #25 from bcgov/form_datasources_changes
kiiskila-bcgov Nov 14, 2024
df5fa9f
Merge pull request #24 from bcgov/fix/bre-minor-fixes
brysonjbest Nov 14, 2024
9932048
Merge pull request #26 from bcgov/ADO-2170
saranyaviswam Nov 14, 2024
bd6fb06
use afteCreate in the create class
kiiskila-bcgov Nov 14, 2024
e222ab9
Merge pull request #27 from bcgov/fix-form-version-creation
DavidOkulski Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,7 @@ jobs:
- name: Run Helm upgrade
run: |
helm upgrade --install klamm-app ./helm --set image.tag=${{ needs.build.outputs.image_tag }}

- name: Trigger OpenShift Rollout
run: |
oc rollout restart deployment/klamm-app
38 changes: 20 additions & 18 deletions app/Console/Commands/CreateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,26 @@ public function handle()
if ($user) {
$this->info('User created successfully!');

// Fetch all available roles
$availableRoles = Role::pluck('name')->toArray();
if (empty($availableRoles)) {
$this->info('No roles available to assign.');
return;
}

$roles = $this->choice(
'Select roles for the user (comma-separated for multiple roles)',
$availableRoles,
null,
null,
true // Allow multiple selections
);

// Assign roles to the user
$user->syncRoles($roles);
$this->info('Roles assigned successfully!');
if ($this->confirm('Do you want to assign a role(s) to this user?', true)) {
// Fetch all available roles
$availableRoles = Role::pluck('name')->toArray();
if (empty($availableRoles)) {
$this->info('No roles available to assign.');
return;
}

$roles = $this->choice(
'Select roles for the user (comma-separated for multiple roles)',
$availableRoles,
null,
null,
true // Allow multiple selections
);

// Assign roles to the user
$user->syncRoles($roles);
$this->info('Roles assigned successfully!');
}
} else {
$this->error('Failed to create user.');
}
Expand Down
23 changes: 7 additions & 16 deletions app/Filament/Admin/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\UserResource\Pages;
use App\Filament\Admin\Resources\UserResource\RelationManagers;
use App\Models\User;
use Filament\Forms;
use Filament\Forms\Form;
Expand Down Expand Up @@ -31,8 +30,8 @@ public static function form(Form $form): Form
Forms\Components\TextInput::make('password')
->password()
->maxLength(255)
->required(fn ($record) => $record === null)
->hidden(fn ($record) => $record !== null),
->required(fn($record) => $record === null)
->hidden(fn($record) => $record !== null),
Forms\Components\Select::make('roles')
->multiple()
->preload()
Expand All @@ -47,27 +46,19 @@ public static function table(Table $table): Table
Tables\Columns\TextColumn::make('name'),
Tables\Columns\TextColumn::make('email'),
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
//
])
->paginated([
10, 25, 50, 100,
]);
->filters([])
->actions([])
->bulkActions([])
->paginated([10, 25, 50, 100]);
}

public static function getPages(): array
{
return [
'index' => Pages\ListUsers::route('/'),
'create' => Pages\CreateUser::route('/create'),
'view' => Pages\ViewUser::route('/{record}'),
'edit' => Pages\EditUser::route('/{record}/edit'),
];
}
}

46 changes: 46 additions & 0 deletions app/Filament/Admin/Resources/UserResource/Pages/ViewUser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace App\Filament\Admin\Resources\UserResource\Pages;

use App\Filament\Admin\Resources\UserResource;
use Filament\Actions;
use Filament\Forms;
use Filament\Resources\Pages\ViewRecord;
use Illuminate\Support\Facades\Hash;
use Filament\Notifications\Notification;

class ViewUser extends ViewRecord
{
protected static string $resource = UserResource::class;

protected function getHeaderActions(): array
{
return [
Actions\EditAction::make(),
Actions\Action::make('resetPassword')
->label('Reset Password')
->modalHeading('Reset User Password')
->form([
Forms\Components\TextInput::make('new_password')
->label('New Password')
->password()
->required(),
Forms\Components\TextInput::make('confirm_password')
->label('Confirm Password')
->password()
->required()
->same('new_password'),
])
->action(function ($data) {
$this->record->update([
'password' => Hash::make($data['new_password']),
]);
Notification::make()
->title("Password reset successfully!")
->success()
->send();
})
->requiresConfirmation(),
];
}
}
7 changes: 7 additions & 0 deletions app/Filament/Bre/Resources/DataValidationResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ public static function table(Table $table): Table
])
->defaultSort('name')
->filters([
Tables\Filters\SelectFilter::make('bre_validation_type')
->label('Value Type')
->multiple()
->searchable()
->preload()
->attribute(('bre_validation_type'))
->relationship('breValidationType', 'name'),
//
])
->actions([
Expand Down
Loading