Bladeren bron

fix bug with country_code

3.x
Andrew Wallo 6 maanden geleden
bovenliggende
commit
444a0887fa

+ 1
- 1
app/Filament/Company/Resources/Sales/ClientResource.php Bestand weergeven

225
                                         $fieldsToSync = [
225
                                         $fieldsToSync = [
226
                                             'address_line_1',
226
                                             'address_line_1',
227
                                             'address_line_2',
227
                                             'address_line_2',
228
-                                            'country',
228
+                                            'country_code',
229
                                             'state_id',
229
                                             'state_id',
230
                                             'city',
230
                                             'city',
231
                                             'postal_code',
231
                                             'postal_code',

+ 2
- 0
app/Filament/Company/Resources/Sales/ClientResource/Pages/CreateClient.php Bestand weergeven

5
 use App\Concerns\RedirectToListPage;
5
 use App\Concerns\RedirectToListPage;
6
 use App\Enums\Common\AddressType;
6
 use App\Enums\Common\AddressType;
7
 use App\Filament\Company\Resources\Sales\ClientResource;
7
 use App\Filament\Company\Resources\Sales\ClientResource;
8
+use App\Models\Common\Address;
8
 use App\Models\Common\Client;
9
 use App\Models\Common\Client;
9
 use Filament\Resources\Pages\CreateRecord;
10
 use Filament\Resources\Pages\CreateRecord;
10
 use Filament\Support\Enums\MaxWidth;
11
 use Filament\Support\Enums\MaxWidth;
27
         $record = parent::handleRecordCreation($data);
28
         $record = parent::handleRecordCreation($data);
28
 
29
 
29
         // Create billing address first
30
         // Create billing address first
31
+        /** @var Address $billingAddress */
30
         $billingAddress = $record->addresses()->create([
32
         $billingAddress = $record->addresses()->create([
31
             ...$data['billingAddress'],
33
             ...$data['billingAddress'],
32
             'type' => AddressType::Billing,
34
             'type' => AddressType::Billing,

Laden…
Annuleren
Opslaan