diff --git a/app/Filament/Resources/OrganizationResource.php b/app/Filament/Resources/OrganizationResource.php index 320fa9a8..3d556c08 100644 --- a/app/Filament/Resources/OrganizationResource.php +++ b/app/Filament/Resources/OrganizationResource.php @@ -6,6 +6,12 @@ use App\Filament\Forms\Components\Download; use App\Filament\Resources\OrganizationResource\Pages; +use App\Filament\Resources\OrganizationResource\RelationManagers\ActivitiesRelationManager; +use App\Filament\Resources\OrganizationResource\RelationManagers\DonationsRelationManager; +use App\Filament\Resources\OrganizationResource\RelationManagers\ProjectsRelationManager; +use App\Filament\Resources\OrganizationResource\RelationManagers\TicketsRelationManager; +use App\Filament\Resources\OrganizationResource\RelationManagers\UsersRelationManager; +use App\Filament\Resources\OrganizationResource\RelationManagers\VolunteersRelationManager; use App\Forms\Components\UserLink; use App\Models\Organization; use App\Rules\ValidCIF; @@ -174,6 +180,18 @@ public static function form(Form $form): Form ]); } + public static function getRelations(): array + { + return [ + ProjectsRelationManager::class, + DonationsRelationManager::class, + UsersRelationManager::class, + VolunteersRelationManager::class, + TicketsRelationManager::class, + ActivitiesRelationManager::class, + ]; + } + public static function getPages(): array { return [ diff --git a/app/Filament/Resources/OrganizationResource/Actions/Pages/RejectOrganizationAction.php b/app/Filament/Resources/OrganizationResource/Actions/Pages/RejectOrganizationAction.php index d63edafd..ec27c0dd 100644 --- a/app/Filament/Resources/OrganizationResource/Actions/Pages/RejectOrganizationAction.php +++ b/app/Filament/Resources/OrganizationResource/Actions/Pages/RejectOrganizationAction.php @@ -5,6 +5,7 @@ namespace App\Filament\Resources\OrganizationResource\Actions\Pages; use App\Models\Organization; +use Filament\Forms\Components\Textarea; use Filament\Pages\Actions\Action; class RejectOrganizationAction extends Action @@ -34,10 +35,18 @@ protected function setUp(): void ]) ); + $this->form([ + Textarea::make('reason') + ->label(__('organization.reject_modal.reason')) + ->required(), + ]); + $this->modalButton(__('organization.actions.reject')); - $this->action(function (Organization $record) { - $record->markAsRejected(); + $this->action(function (Organization $record, array $data) { + $reason = strip_tags($data['reason']); + + $record->markAsRejected($reason); }); } } diff --git a/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/ApproveOrganizationAction.php b/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/ApproveOrganizationAction.php index 1a024032..10f621ff 100644 --- a/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/ApproveOrganizationAction.php +++ b/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/ApproveOrganizationAction.php @@ -6,6 +6,7 @@ use App\Models\Organization; use Filament\Tables\Actions\Action; +use Livewire\Component; class ApproveOrganizationAction extends Action { @@ -39,5 +40,7 @@ protected function setUp(): void $this->action(function (Organization $record) { $record->markAsApproved(); }); + + $this->after(fn (Component $livewire) => $livewire->emit('refreshApprovedOrganizationsWidget')); } } diff --git a/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/DeactivateOrganizationAction.php b/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/DeactivateOrganizationAction.php index bc1fa180..9d66f9f3 100644 --- a/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/DeactivateOrganizationAction.php +++ b/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/DeactivateOrganizationAction.php @@ -5,7 +5,9 @@ namespace App\Filament\Resources\OrganizationResource\Actions\Tables\Organizations; use App\Models\Organization; +use Filament\Forms\Components\Textarea; use Filament\Tables\Actions\Action; +use Livewire\Component; class DeactivateOrganizationAction extends Action { @@ -34,10 +36,20 @@ protected function setUp(): void ]) ); + $this->form([ + Textarea::make('reason') + ->label(__('organization.deactivate_modal.reason')) + ->required(), + ]); + $this->modalButton(__('organization.actions.deactivate')); - $this->action(function (Organization $record) { - $record->markAsRejected(); + $this->action(function (Organization $record, array $data) { + $reason = strip_tags($data['reason']); + + $record->markAsRejected($reason); }); + + $this->after(fn (Component $livewire) => $livewire->emit('refreshRejectedOrganizationsWidget')); } } diff --git a/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/ReactivateOrganizationAction.php b/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/ReactivateOrganizationAction.php index 4aa7face..b978a611 100644 --- a/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/ReactivateOrganizationAction.php +++ b/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/ReactivateOrganizationAction.php @@ -6,6 +6,7 @@ use App\Models\Organization; use Filament\Tables\Actions\Action; +use Livewire\Component; class ReactivateOrganizationAction extends Action { @@ -39,5 +40,7 @@ protected function setUp(): void $this->action(function (Organization $record) { $record->markAsApproved(); }); + + $this->after(fn (Component $livewire) => $livewire->emit('refreshApprovedOrganizationsWidget')); } } diff --git a/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/RejectOrganizationAction.php b/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/RejectOrganizationAction.php index 6c9f5425..9c3306ae 100644 --- a/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/RejectOrganizationAction.php +++ b/app/Filament/Resources/OrganizationResource/Actions/Tables/Organizations/RejectOrganizationAction.php @@ -5,7 +5,9 @@ namespace App\Filament\Resources\OrganizationResource\Actions\Tables\Organizations; use App\Models\Organization; +use Filament\Forms\Components\Textarea; use Filament\Tables\Actions\Action; +use Livewire\Component; class RejectOrganizationAction extends Action { @@ -34,10 +36,20 @@ protected function setUp(): void ]) ); + $this->form([ + Textarea::make('reason') + ->label(__('organization.reject_modal.reason')) + ->required(), + ]); + $this->modalButton(__('organization.actions.reject')); - $this->action(function (Organization $record) { - $record->markAsRejected(); + $this->action(function (Organization $record, array $data) { + $reason = strip_tags($data['reason']); + + $record->markAsRejected($reason); }); + + $this->after(fn (Component $livewire) => $livewire->emit('refreshRejectedOrganizationsWidget')); } } diff --git a/app/Filament/Resources/OrganizationResource/Pages/ViewOrganization.php b/app/Filament/Resources/OrganizationResource/Pages/ViewOrganization.php index ed774998..0c8d1673 100644 --- a/app/Filament/Resources/OrganizationResource/Pages/ViewOrganization.php +++ b/app/Filament/Resources/OrganizationResource/Pages/ViewOrganization.php @@ -41,10 +41,13 @@ protected function getActions(): array ]; } - protected function getFooterWidgets(): array + public function hasCombinedRelationManagerTabsWithForm(): bool { - return [ - OrganizationActivityWidget::class, - ]; + return true; + } + + public function getFormTabLabel(): ?string + { + return __('organization.organization'); } } diff --git a/app/Filament/Resources/OrganizationResource/RelationManagers/ActivitiesRelationManager.php b/app/Filament/Resources/OrganizationResource/RelationManagers/ActivitiesRelationManager.php new file mode 100644 index 00000000..48b3429d --- /dev/null +++ b/app/Filament/Resources/OrganizationResource/RelationManagers/ActivitiesRelationManager.php @@ -0,0 +1,132 @@ +schema([ + Forms\Components\TextInput::make('description') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + TextColumn::make('created_at') + ->label(__('activity.column.created_at')) + ->sortable(), + + TextColumn::make('changed_field') + ->label(__('activity.column.changed_field')) + ->formatStateUsing( + fn ($state) => __('organization.labels.' . $state) + ), + + TextColumn::make('causer.name') + ->label(__('activity.column.causer')) + ->description( + fn (Activity $record) => $record->causer?->role->label() + ) + ->url( + fn (Activity $record) => $record->causer + ? UserResource::getUrl('view', $record->causer) + : null + ) + ->sortable(), + + TextColumn::make('status') + ->label(__('activity.column.status')), + ]) + ->filters([ + Filter::make('created_at') + ->columns() + ->form([ + DatePicker::make('logged_from') + ->label(__('activity.filter.logged_from')) + ->placeholder( + fn ($state): string => today() + ->setDay(17) + ->setMonth(11) + ->subYear() + ->toFormattedDate() + ), + + DatePicker::make('logged_until') + ->label(__('activity.filter.logged_until')) + ->placeholder( + fn ($state): string => today() + ->toFormattedDate() + ), + ]) + ->query( + fn (Builder $query, array $data) => $query->betweenDates( + data_get($data, 'logged_from'), + data_get($data, 'logged_until'), + ) + ) + ->indicateUsing( + fn (array $data) => collect(['logged_from', 'logged_until']) + ->mapWithKeys(function (string $filter) use ($data) { + $value = data_get($data, $filter); + + if (! \is_null($value)) { + $value = __("activity.indicator.{$filter}", [ + 'date' => Carbon::parse($value)->toFormattedDate(), + ]); + } + + return [$filter => $value]; + }) + ->filter() + ->all() + ), + + // SelectFilter::make('causer_id') + // ->relationship('causer', 'name'), + + // SelectFilter::make('changed_field'), + ]) + ->filtersLayout(Layout::AboveContent) + ->actions([ + ViewActivityAction::make(), + + ApproveActivityAction::make(), + + RejectActivityAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/OrganizationResource/RelationManagers/DonationsRelationManager.php b/app/Filament/Resources/OrganizationResource/RelationManagers/DonationsRelationManager.php new file mode 100644 index 00000000..9329f6f9 --- /dev/null +++ b/app/Filament/Resources/OrganizationResource/RelationManagers/DonationsRelationManager.php @@ -0,0 +1,54 @@ +schema([ + Forms\Components\TextInput::make('uuid') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('uuid'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/OrganizationResource/RelationManagers/ProjectsRelationManager.php b/app/Filament/Resources/OrganizationResource/RelationManagers/ProjectsRelationManager.php new file mode 100644 index 00000000..2ea1834f --- /dev/null +++ b/app/Filament/Resources/OrganizationResource/RelationManagers/ProjectsRelationManager.php @@ -0,0 +1,55 @@ +schema([ + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/OrganizationResource/RelationManagers/TicketsRelationManager.php b/app/Filament/Resources/OrganizationResource/RelationManagers/TicketsRelationManager.php new file mode 100644 index 00000000..4225ea1b --- /dev/null +++ b/app/Filament/Resources/OrganizationResource/RelationManagers/TicketsRelationManager.php @@ -0,0 +1,54 @@ +schema([ + Forms\Components\TextInput::make('subject') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('subject'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/OrganizationResource/RelationManagers/UsersRelationManager.php b/app/Filament/Resources/OrganizationResource/RelationManagers/UsersRelationManager.php new file mode 100644 index 00000000..00fb8542 --- /dev/null +++ b/app/Filament/Resources/OrganizationResource/RelationManagers/UsersRelationManager.php @@ -0,0 +1,54 @@ +schema([ + Forms\Components\TextInput::make('name') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('name'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/OrganizationResource/RelationManagers/VolunteersRelationManager.php b/app/Filament/Resources/OrganizationResource/RelationManagers/VolunteersRelationManager.php new file mode 100644 index 00000000..e5edc39e --- /dev/null +++ b/app/Filament/Resources/OrganizationResource/RelationManagers/VolunteersRelationManager.php @@ -0,0 +1,54 @@ +schema([ + Forms\Components\TextInput::make('full_name') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('full_name'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/OrganizationResource/Widgets/ApprovedOrganizationsWidget.php b/app/Filament/Resources/OrganizationResource/Widgets/ApprovedOrganizationsWidget.php index 27580a98..ab0deb43 100644 --- a/app/Filament/Resources/OrganizationResource/Widgets/ApprovedOrganizationsWidget.php +++ b/app/Filament/Resources/OrganizationResource/Widgets/ApprovedOrganizationsWidget.php @@ -15,6 +15,10 @@ class ApprovedOrganizationsWidget extends BaseOrganizationsWidget { + protected $listeners = [ + 'refreshApprovedOrganizationsWidget' => '$refresh', + ]; + protected function getTableHeading(): string { return __('organization.heading.approved'); diff --git a/app/Filament/Resources/OrganizationResource/Widgets/PendingChangesOrganizationsWidget.php b/app/Filament/Resources/OrganizationResource/Widgets/PendingChangesOrganizationsWidget.php index c4c1ed64..6dcf3a8f 100644 --- a/app/Filament/Resources/OrganizationResource/Widgets/PendingChangesOrganizationsWidget.php +++ b/app/Filament/Resources/OrganizationResource/Widgets/PendingChangesOrganizationsWidget.php @@ -4,6 +4,8 @@ namespace App\Filament\Resources\OrganizationResource\Widgets; +use App\Models\Activity; +use App\Models\Organization; use App\Tables\Columns\TitleWithImageColumn; use Filament\Tables\Actions\ViewAction; use Filament\Tables\Columns\TextColumn; @@ -18,11 +20,26 @@ protected function getTableHeading(): string protected function getTableQuery(): Builder { - return parent::getTableQuery()->whereHas('activities', function ($q) { - $q->where('log_name', 'pending') - ->where('approved_at', null) - ->where('rejected_at', null); - }); + return parent::getTableQuery() + ->whereHas('activities', function (Builder $query) { + $query->wherePending(); + }) + ->withCount([ + 'activities' => fn (Builder $query) => $query->wherePending(), + ]) + ->addSelect([ + 'latest_updated_at' => Activity::query() + ->withoutGlobalScopes() + ->wherePending() + ->select('created_at') + ->whereColumn('subject_id', 'organizations.id') + ->whereMorphedTo('subject', Organization::class) + ->latest() + ->take(1), + ]) + ->withCasts([ + 'latest_updated_at' => 'datetime', + ]); } protected function getTableQueryStringIdentifier(): ?string @@ -35,26 +52,16 @@ protected function getTableColumns(): array return [ TitleWithImageColumn::make('name') ->label(__('organization.organization')) - ->image(fn ($record) => $record->getFirstMediaUrl('logo')) - ->description( - fn ($record) => sprintf( - '%s: %s', - __('field.updated_at'), - $record->activities->last()->created_at->toFormattedDateTime() - ) - ) + ->image(fn (Organization $record) => $record->getFirstMediaUrl('logo')) ->searchable() ->sortable(), - TextColumn::make('created_at') - ->label(__('organization.labels.approved_at')) - ->description( - fn ($record) => sprintf( - '%s: %s', - __('field.updated_at'), - $record->activities->first()->created_at->toFormattedDateTime() - ) - ) + TextColumn::make('activities_count') + ->label(__('organization.labels.changes_count')) + ->sortable(), + + TextColumn::make('latest_updated_at') + ->label(__('organization.labels.latest_updated_at')) ->dateTime() ->sortable(), ]; diff --git a/app/Filament/Resources/OrganizationResource/Widgets/RejectedOrganizationsWidget.php b/app/Filament/Resources/OrganizationResource/Widgets/RejectedOrganizationsWidget.php index 3a1a240b..d4257071 100644 --- a/app/Filament/Resources/OrganizationResource/Widgets/RejectedOrganizationsWidget.php +++ b/app/Filament/Resources/OrganizationResource/Widgets/RejectedOrganizationsWidget.php @@ -15,6 +15,10 @@ class RejectedOrganizationsWidget extends BaseOrganizationsWidget { + protected $listeners = [ + 'refreshRejectedOrganizationsWidget' => '$refresh', + ]; + protected function getTableHeading(): string { return __('organization.heading.rejected'); diff --git a/app/Filament/Resources/TicketResource.php b/app/Filament/Resources/TicketResource.php index 65b4fe12..1c2acabd 100644 --- a/app/Filament/Resources/TicketResource.php +++ b/app/Filament/Resources/TicketResource.php @@ -45,6 +45,16 @@ public static function form(Form $form): Form ->inlineLabel() ->columnSpanFull(), + Value::make('user.name') + ->label(__('ticket.opened_by')) + ->inlineLabel() + ->columnSpanFull(), + + Value::make('organization.name') + ->label(__('ticket.organization')) + ->inlineLabel() + ->columnSpanFull(), + Value::make('closed_at') ->visible(fn (Ticket $record) => ! $record->isOpen()) ->label(__('ticket.closed_at')) diff --git a/app/Filament/Resources/TicketResource/Widgets/OpenTicketsWidget.php b/app/Filament/Resources/TicketResource/Widgets/OpenTicketsWidget.php index 5e24d750..4f7d70f6 100644 --- a/app/Filament/Resources/TicketResource/Widgets/OpenTicketsWidget.php +++ b/app/Filament/Resources/TicketResource/Widgets/OpenTicketsWidget.php @@ -4,6 +4,7 @@ namespace App\Filament\Resources\TicketResource\Widgets; +use App\Filament\Resources\OrganizationResource; use App\Filament\Resources\TicketResource; use App\Models\Ticket; use Closure; @@ -47,10 +48,18 @@ protected function getDefaultTableSortDirection(): ?string protected function getTableColumns(): array { return [ + TextColumn::make('id') + ->label('ID') + ->prefix('#') + ->sortable(), + TextColumn::make('subject') ->label(__('ticket.subject')), + TextColumn::make('organization.name') - ->label(__('ticket.organization')), + ->label(__('ticket.organization')) + ->url(fn (Ticket $record) => OrganizationResource::getUrl('view', $record->organization)), + TextColumn::make('created_at') ->label(__('ticket.date')), ]; diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 60ef863b..df5e8c3a 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -41,6 +41,26 @@ public function scopeBetweenDates(Builder $query, ?string $from = null, ?string }); } + public function scopeWherePending(Builder $query): Builder + { + return $query->inLog('pending') + ->whereNull('approved_at') + ->whereNull('rejected_at'); + } + + public function scopePendingChangesFor(Builder $query, Model $subject, array $keys = []): Builder + { + return $query->wherePending() + ->forSubject($subject) + ->when(filled($keys), function (Builder $query) use ($keys) { + $query->where(function (Builder $query) use ($keys) { + foreach ($keys as $key) { + $query->orWhereJsonContainsKey("properties->{$key}"); + } + }); + }); + } + public function getChangedFieldAttribute(): ?string { return $this->properties->keys()->first(); @@ -100,21 +120,6 @@ public function isRejected(): bool return null !== $this->rejected_at; } - public function scopePendingChangesFor(Builder $query, Model $subject, array $keys = []): Builder - { - return $query->inLog('pending') - ->forSubject($subject) - ->whereNull('approved_at') - ->whereNull('rejected_at') - ->when(filled($keys), function (Builder $query) use ($keys) { - $query->where(function (Builder $query) use ($keys) { - foreach ($keys as $key) { - $query->orWhereJsonContainsKey("properties->{$key}"); - } - }); - }); - } - public function approve(): void { if ($this->isRejected()) { diff --git a/app/Models/Organization.php b/app/Models/Organization.php index 06c7140f..ce49ebbe 100644 --- a/app/Models/Organization.php +++ b/app/Models/Organization.php @@ -78,6 +78,11 @@ public function projects(): HasMany return $this->hasMany(Project::class)->without('organization'); } + public function donations() + { + return $this->hasManyThrough(Donation::class, Project::class); + } + public function registerMediaCollections(): void { $this->addMediaCollection('logo') @@ -223,12 +228,18 @@ public function markAsApproved(): bool ]); } - public function markAsRejected(): bool + public function markAsRejected(?string $reason = null): void { - return $this->update([ + $this->update([ 'status' => OrganizationStatus::rejected, 'status_updated_at' => $this->freshTimestamp(), ]); + + $this->tickets()->create([ + 'subject' => __('organization.ticket_rejected.subject'), + 'content' => $reason, + 'user_id' => auth()->user()->id, + ]); } public function markAsPending(): bool diff --git a/lang/ro/activity.php b/lang/ro/activity.php index abe79ea9..a39581e8 100644 --- a/lang/ro/activity.php +++ b/lang/ro/activity.php @@ -4,6 +4,11 @@ return[ + 'label' => [ + 'singular' => 'modificare', + 'plural' => 'Istoric modificări', + ], + 'status' => [ 'pending' => 'În așteptare', 'auto_approved' => 'Aprobată automat', @@ -22,9 +27,17 @@ 'old' => 'Valoare anterioară', 'new' => 'Valoare nouă', ], + 'actions' => [ 'approve' => 'Aprobă', 'reject' => 'Respinge', ], + 'filter' => [ + 'logged_from' => 'Dată început', + 'logged_until' => 'Dată sfârșit', + 'caused_by' => 'Editat de către', + 'changed_field' => 'Câmpul editat', + ], + ]; diff --git a/lang/ro/donation.php b/lang/ro/donation.php new file mode 100644 index 00000000..92c69b48 --- /dev/null +++ b/lang/ro/donation.php @@ -0,0 +1,7 @@ +[ + 'singular'=>'Donație', + 'plural'=>'Donații', + ], +]; diff --git a/lang/ro/organization.php b/lang/ro/organization.php index 421bab21..01d69d62 100644 --- a/lang/ro/organization.php +++ b/lang/ro/organization.php @@ -74,6 +74,8 @@ 'has_active_projects' => 'Organizația are proiecte active?', 'has_eu_platesc' => 'Organizația are date EuPlătesc?', 'has_donations' => 'Organizația are donații?', + 'changes_count' => 'Număr modificări în așteptare', + 'latest_updated_at' => 'Data ultimei modificări', ], 'messages' => [ 'update_success' => 'Organizația a fost actualizată cu succes!', @@ -92,15 +94,21 @@ 'reject_modal' => [ 'heading' => 'Respinge organizația', 'subheading' => 'Sunteți sigur că doriți să respingeți organizația ":name"?', + 'reason' => 'Motiv respingere', ], 'deactivate_modal' => [ 'heading' => 'Dezactivează organizația', 'subheading' => 'Sunteți sigur că doriți să dezactivați organizația ":name"?', + 'reason' => 'Motiv respingere', ], 'reactivate_modal' => [ 'heading' => 'Reactivează organizația', 'subheading' => 'Sunteți sigur că doriți să reactivați organizația ":name"?', ], + + 'ticket_rejected' => [ + 'subject' => 'Organizația ta a fost respinsă de către un administrator.', + ], ]; diff --git a/lang/ro/project.php b/lang/ro/project.php index 18e9c5d1..285ebf09 100644 --- a/lang/ro/project.php +++ b/lang/ro/project.php @@ -36,6 +36,10 @@ 'approved' => 'Proiecte active', 'rejected' => 'Proiecte refuzate' , ], + 'label' => [ + 'singular' => 'Proiect', + 'plural' => 'Proiecte', + ], 'labels' =>[ 'project' => 'Proiect', diff --git a/lang/ro/ticket.php b/lang/ro/ticket.php index 8976eba6..ddfd6347 100644 --- a/lang/ro/ticket.php +++ b/lang/ro/ticket.php @@ -4,9 +4,15 @@ return[ + 'label'=>[ + 'singular'=>'Tichet', + 'plural'=>'Tichete', + ], + 'closed_at' => 'Închis la data', 'date' => 'Dată', 'message' => 'Mesaj', + 'opened_by' => 'Deschis de', 'organization' => 'Organizație', 'subject' => 'Subiect', 'status' => 'Status', diff --git a/lang/ro/user.php b/lang/ro/user.php index afa0080e..86854679 100644 --- a/lang/ro/user.php +++ b/lang/ro/user.php @@ -1,16 +1,20 @@ [ - 'donor'=>'Donator', - 'ngo-admin'=>'Administrator ONG', - 'bb-manager'=>'Manager Bursa Binelui', - 'bb-admin'=>'Administrator Bursa Binelui', + 'roles' => [ + 'donor' => 'Donator', + 'ngo-admin' => 'Administrator ONG', + 'bb-manager' => 'Manager Bursa Binelui', + 'bb-admin' => 'Administrator Bursa Binelui', ], - 'name'=>'Nume', - 'email'=>'Email', - 'role'=>'Rol', - 'organization'=>'Organizație', - 'messages'=>[ + 'label' => [ + 'singular' => 'Utilizator', + 'plural' => 'Utilizatori', + ], + 'name' => 'Nume', + 'email' => 'Email', + 'role' => 'Rol', + 'organization' => 'Organizație', + 'messages' => [ 'set_initial_password_success' => 'Parola a fost setată cu succes!', ] ]; diff --git a/lang/ro/volunteer.php b/lang/ro/volunteer.php new file mode 100644 index 00000000..878088be --- /dev/null +++ b/lang/ro/volunteer.php @@ -0,0 +1,7 @@ +[ + 'singular'=>'Voluntar', + 'plural'=>'Voluntarii', + ], +];