Skip to content

Commit 442b3bb

Browse files
Merge pull request #62 from Relaticle/revert-57-feature/enhancements
Revert "Feature/enhancements"
2 parents faf22e1 + 0147072 commit 442b3bb

34 files changed

+276
-1054
lines changed

resources/lang/en/custom-fields.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
'default' => [
2525
'new_section' => 'New Section',
2626
],
27-
'default_section_name' => 'Default',
2827
],
2928

3029
'field' => [
@@ -66,12 +65,6 @@
6665
],
6766
'add_field' => 'Add Field',
6867
'system_defined_cannot_delete' => 'System-defined fields cannot be deleted.',
69-
'allow_multiple' => 'Allow Multiple Values',
70-
'allow_multiple_help' => 'When enabled, users can enter multiple values for this field.',
71-
'max_values' => 'Maximum Values',
72-
'max_values_help' => 'The maximum number of values that can be entered.',
73-
'unique_per_entity_type' => 'Unique Per Entity Type',
74-
'unique_per_entity_type_help' => 'Each value can only be assigned to one record of this entity type.',
7568
'validation' => [
7669
'label' => 'Validation',
7770
'rules' => 'Validation Rules',
@@ -322,7 +315,6 @@
322315
'multi_parameter_missing' => 'This validation rule requires multiple parameters. Please add all required parameters.',
323316
'parameter_missing' => 'This validation rule requires exactly :count parameter(s). Please add all required parameters.',
324317
'invalid_rule_for_field_type' => 'The selected rule is not valid for this field type.',
325-
'unique_value' => 'The value ":value" is already assigned to another record.',
326318
],
327319

328320
'empty_states' => [
@@ -336,19 +328,9 @@
336328
'description' => 'Drag and drop fields here or click the button below to add your first field.',
337329
'icon' => 'heroicon-o-squares-plus',
338330
],
339-
'fields_no_sections' => [
340-
'heading' => 'No custom fields yet',
341-
'description' => 'Click the button below to add your first custom field.',
342-
'icon' => 'heroicon-o-squares-plus',
343-
],
344331
],
345332

346333
'common' => [
347334
'inactive' => 'Inactive',
348335
],
349-
350-
'email' => [
351-
'add_email_placeholder' => 'Add email address...',
352-
],
353-
354336
];

resources/views/filament/pages/custom-fields-management.blade.php

Lines changed: 32 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,57 +9,43 @@
99
</x-filament::tabs>
1010

1111
<div class="custom-fields-component">
12-
@if($this->isSectionsDisabled)
13-
{{-- Sections disabled mode: show flat field list with new component --}}
14-
@if($this->sections->first())
15-
@livewire('manage-fields-without-sections', [
16-
'entityType' => $this->currentEntityType,
17-
'section' => $this->sections->first(),
18-
], key('fields-without-sections-' . $this->currentEntityType))
19-
@endif
20-
@else
21-
{{-- Normal sections mode --}}
22-
<div
23-
x-sortable
24-
wire:end.stop="updateSectionsOrder($event.target.sortable.toArray())"
25-
class="flex flex-col gap-y-6"
26-
>
27-
@foreach ($this->sections as $section)
28-
@livewire('manage-custom-field-section', [
29-
'entityType' => $this->currentEntityType,
30-
'section' => $section,
31-
], key($section->id . str()->random(16)))
32-
@endforeach
12+
<div
13+
x-sortable
14+
wire:end.stop="updateSectionsOrder($event.target.sortable.toArray())"
15+
class="flex flex-col gap-y-6"
16+
>
17+
@foreach ($this->sections as $section)
18+
@livewire('manage-custom-field-section', ['entityType' => $this->currentEntityType, 'section' => $section], key($section->id . str()->random(16)))
19+
@endforeach
3320

34-
@if(!count($this->sections))
35-
<div class="px-6 py-16">
36-
<div class="mx-auto grid max-w-md justify-items-center text-center">
37-
<div class="fi-ta-empty-state-icon-ctn mb-6 rounded-full bg-primary-50 p-4 dark:bg-primary-950/50">
38-
<x-filament::icon
39-
icon="{{ __('custom-fields::custom-fields.empty_states.sections.icon') }}"
40-
class="fi-ta-empty-state-icon h-8 w-8 text-primary-500 dark:text-primary-400"
41-
/>
42-
</div>
21+
@if(!count($this->sections))
22+
<div class="fi-ta-empty-state px-6 py-16">
23+
<div class="fi-ta-empty-state-content mx-auto grid max-w-md justify-items-center text-center">
24+
<div class="fi-ta-empty-state-icon-ctn mb-6 rounded-full bg-primary-50 p-4 dark:bg-primary-950/50">
25+
<x-filament::icon
26+
icon="{{ __('custom-fields::custom-fields.empty_states.sections.icon') }}"
27+
class="fi-ta-empty-state-icon h-8 w-8 text-primary-500 dark:text-primary-400"
28+
/>
29+
</div>
4330

44-
<h3 class="fi-ta-empty-state-heading text-lg font-semibold leading-7 text-gray-950 dark:text-white mb-2">
45-
{{ __('custom-fields::custom-fields.empty_states.sections.heading') }}
46-
</h3>
31+
<h3 class="fi-ta-empty-state-heading text-lg font-semibold leading-7 text-gray-950 dark:text-white mb-2">
32+
{{ __('custom-fields::custom-fields.empty_states.sections.heading') }}
33+
</h3>
4734

48-
<p class="fi-ta-empty-state-description text-sm text-gray-600 dark:text-gray-400 mb-6 leading-relaxed">
49-
{{ __('custom-fields::custom-fields.empty_states.sections.description') }}
50-
</p>
35+
<p class="fi-ta-empty-state-description text-sm text-gray-600 dark:text-gray-400 mb-6 leading-relaxed">
36+
{{ __('custom-fields::custom-fields.empty_states.sections.description') }}
37+
</p>
5138

52-
<div class="fi-ta-empty-state-action">
53-
{{ $this->createSectionAction }}
54-
</div>
39+
<div class="fi-ta-empty-state-action">
40+
{{ $this->createSectionAction }}
5541
</div>
5642
</div>
57-
@else
58-
<div class="mt-6 flex justify-center">
59-
{{ $this->createSectionAction }}
60-
</div>
61-
@endif
62-
</div>
63-
@endif
43+
</div>
44+
@else
45+
<div class="mt-6 flex justify-center">
46+
{{ $this->createSectionAction }}
47+
</div>
48+
@endif
49+
</div>
6450
</div>
6551
</x-filament-panels::page>

resources/views/livewire/manage-custom-field-section.blade.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
<x-filament::icon-button
1111
icon="heroicon-m-bars-4"
1212
color="gray"
13-
class="text-gray-500"
14-
size="xs"
1513
x-sortable-handle
1614
/>
1715

@@ -32,7 +30,7 @@ class="text-gray-500"
3230
x-sortable-group="fields"
3331
data-section-id="{{ $section->id }}"
3432
default="12"
35-
class="fi-sc fi-sc-has-gap fi-sc-dense fi-grid lg:fi-grid-cols"
33+
class="fi-sc fi-sc-has-gap fi-grid lg:fi-grid-cols"
3634
style="--cols-lg: repeat(12, minmax(0, 12fr)); --cols-default: repeat(2, minmax(0, 1fr));"
3735
@end.stop="$wire.updateFieldsOrder($event.to.getAttribute('data-section-id'), $event.to.sortable.toArray())"
3836
>
@@ -42,8 +40,8 @@ class="fi-sc fi-sc-has-gap fi-sc-dense fi-grid lg:fi-grid-cols"
4240

4341
@if(!count($this->fields))
4442
<div class="fi-grid-col" style="--col-span-default: span 12 / span 12;">
45-
<div class="py-12">
46-
<div class="mx-auto grid max-w-xs justify-items-center text-center">
43+
<div class="fi-ta-empty-state py-12">
44+
<div class="fi-ta-empty-state-content mx-auto grid max-w-xs justify-items-center text-center">
4745
<div class="fi-ta-empty-state-icon-ctn mb-4 rounded-full bg-gray-50 p-3 dark:bg-gray-800/50">
4846
<x-filament::icon
4947
icon="{{ __('custom-fields::custom-fields.empty_states.fields.icon') }}"

resources/views/livewire/manage-custom-field-width.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class="relative"
1414
<template x-for="(width, index) in widths" :key="index">
1515
<div
1616
wire:click="$parent.setWidth(fieldId, width)"
17-
class="h-6 flex-1 cursor-pointer bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 transition-colors"
17+
class="h-6 flex-1 cursor-pointer bg-gray-200 hover:bg-gray-300 transition-colors"
1818
:class="{
1919
'rounded-s-md': index === 0,
2020
'rounded-e-md': index === widths.length - 1
@@ -26,12 +26,12 @@ class="h-full w-full border-gray-300 transition-colors duration-200"
2626
'bg-primary-600 hover:bg-primary-600/80': isSelected(width),
2727
'rounded-s-md': index === 0 && isSelected(width),
2828
'rounded-e-md': index === widths.length - 1 && isSelected(width),
29-
'border-s': index !== widths.length && index !== 0,
29+
'border-s': index !== widths.length - 1
3030
}"
3131
></div>
3232
</div>
3333
</template>
3434
</div>
35-
<div class="absolute w-full h-full font-semibold text-sm flex items-center justify-center text-gray-900 dark:text-white">{{ $selectedWidth }}%</div>
35+
<div class="absolute w-full h-full font-semibold text-sm flex items-center justify-center text-black">{{ $selectedWidth }}%</div>
3636
</div>
3737
</div>

resources/views/livewire/manage-custom-field.blade.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ class="fi-section !px-2 fi-compact !py-2 shadow-none fi-grid-col flex justify-be
1010
<x-filament::icon-button
1111
icon="heroicon-m-bars-3"
1212
color="gray"
13-
class="ml-0.5 text-gray-500"
14-
size="xs"
1513
/>
1614

1715
<x-filament::icon
1816
:icon="$field->typeData?->icon ?? 'heroicon-o-document-text'"
19-
class="h-4.5 w-4.5 text-neutral-700 dark:text-neutral-400 ml-2"
17+
class="h-5 w-5 text-gray-500 dark:text-gray-400"
2018
:aria-label="$field->name"
2119
/>
2220

resources/views/livewire/manage-fields-without-sections.blade.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/Console/Commands/MigrateEmailFieldValuesCommand.php

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)