Skip to content

Commit bc47f78

Browse files
author
Sebastian Fix
committed
WIP
1 parent 5e81ce9 commit bc47f78

21 files changed

Lines changed: 314 additions & 539 deletions

app/Actions/ViewDataAction.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public function contacts(string $locale): object
8282
->get();
8383

8484
return (object) collect([
85-
ContactSectionEnum::EMPLOYEES,
85+
ContactSectionEnum::SOFTWARE_ENGINERING,
86+
ContactSectionEnum::DIGITAL_TRANSFORMATION,
87+
ContactSectionEnum::SCANNING,
8688
ContactSectionEnum::COLLABORATIONS,
8789
ContactSectionEnum::BOARD_MEMBERS,
8890
])->mapWithKeys(function (string $section) use ($publishedContacts, $locale): array {

app/Enums/ContactSectionEnum.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
enum ContactSectionEnum: string
66
{
7-
const string EMPLOYEES = 'employees';
7+
const string SOFTWARE_ENGINERING = 'software_engineering';
8+
9+
const string DIGITAL_TRANSFORMATION = 'digital_transformation';
10+
11+
const string SCANNING = 'scanning';
812

913
const string COLLABORATIONS = 'collaborations';
1014

config/seeder.php

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

database/seeders/Codebar/ConfigurationsTableSeeder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ public function run(): void
2323
LocaleEnum::EN->value => file_get_contents(database_path('files/intro/codebar_intro_en.md')),
2424
],
2525

26-
'section_news' => false,
27-
'section_services' => false,
28-
'section_products' => false,
29-
'section_technologies' => false,
30-
'section_open_source' => false,
26+
'section_news' => true,
27+
'section_services' => true,
28+
'section_products' => true,
29+
'section_technologies' => true,
30+
'section_open_source' => true,
3131

3232
'key' => '_codebar',
3333

database/seeders/Codebar/ContactsTableSeeder.php

Lines changed: 110 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,20 @@ public function run(): void
1616
'name' => 'Sebastian Bürgin-Fix',
1717
'published' => true,
1818
'sections' => [
19-
ContactSectionEnum::EMPLOYEES => [
20-
'key' => ContactSectionEnum::EMPLOYEES,
19+
ContactSectionEnum::SOFTWARE_ENGINERING => [
20+
'key' => ContactSectionEnum::SOFTWARE_ENGINERING,
2121
'role' => [
2222
'de_CH' => 'Software-Architekt',
2323
'en_CH' => 'Software-Engineer',
2424
],
2525
],
26+
ContactSectionEnum::DIGITAL_TRANSFORMATION => [
27+
'key' => ContactSectionEnum::DIGITAL_TRANSFORMATION,
28+
'role' => [
29+
'de_CH' => 'DMS/ECM-Architekt',
30+
'en_CH' => 'DMS/ECM-Engineer',
31+
],
32+
],
2633
ContactSectionEnum::BOARD_MEMBERS => [
2734
'key' => ContactSectionEnum::BOARD_MEMBERS,
2835
],
@@ -41,8 +48,8 @@ public function run(): void
4148
'name' => 'Melanie Bürgin-Fix',
4249
'published' => true,
4350
'sections' => [
44-
ContactSectionEnum::EMPLOYEES => [
45-
'key' => ContactSectionEnum::EMPLOYEES,
51+
ContactSectionEnum::DIGITAL_TRANSFORMATION => [
52+
'key' => ContactSectionEnum::DIGITAL_TRANSFORMATION,
4653
'role' => [
4754
'de_CH' => 'Projektleiterin',
4855
'en_CH' => 'Project Manager',
@@ -66,8 +73,8 @@ public function run(): void
6673
'name' => 'Tobias Brogle',
6774
'published' => true,
6875
'sections' => [
69-
ContactSectionEnum::EMPLOYEES => [
70-
'key' => ContactSectionEnum::EMPLOYEES,
76+
ContactSectionEnum::SOFTWARE_ENGINERING => [
77+
'key' => ContactSectionEnum::SOFTWARE_ENGINERING,
7178
'role' => [
7279
'de_CH' => 'Applikationsentwickler',
7380
'en_CH' => 'Application Developer',
@@ -88,8 +95,8 @@ public function run(): void
8895
'name' => 'Alexander Christoph Boll',
8996
'published' => true,
9097
'sections' => [
91-
ContactSectionEnum::EMPLOYEES => [
92-
'key' => ContactSectionEnum::EMPLOYEES,
98+
ContactSectionEnum::DIGITAL_TRANSFORMATION => [
99+
'key' => ContactSectionEnum::DIGITAL_TRANSFORMATION,
93100
'role' => [
94101
'de_CH' => 'Produkt- und Innovationsmanagement',
95102
'en_CH' => 'Product and Innovation Management',
@@ -110,8 +117,8 @@ public function run(): void
110117
'name' => 'Faissal Wahabali',
111118
'published' => true,
112119
'sections' => [
113-
ContactSectionEnum::EMPLOYEES => [
114-
'key' => ContactSectionEnum::EMPLOYEES,
120+
ContactSectionEnum::SOFTWARE_ENGINERING => [
121+
'key' => ContactSectionEnum::SOFTWARE_ENGINERING,
115122
'role' => [
116123
'de_CH' => 'Applikationsentwickler',
117124
'en_CH' => 'Application Developer',
@@ -129,22 +136,22 @@ public function run(): void
129136
Contact::updateOrCreate(
130137
['id' => 6],
131138
[
132-
'name' => 'PST GmbH',
133-
'published' => false,
139+
'name' => 'Sarah Fässler',
140+
'published' => true,
134141
'sections' => [
135142
ContactSectionEnum::COLLABORATIONS => [
136143
'key' => ContactSectionEnum::COLLABORATIONS,
137144
'role' => [
138-
'de_CH' => 'Finanzen',
139-
'en_CH' => 'Finance',
145+
'de_CH' => 'PST GmbH',
146+
'en_CH' => 'PST GmbH',
140147
],
141148
],
142149
],
143150
'icons' => [
144-
'email' => 'info@pstgmbh.ch',
151+
'email' => 'sarah.faessler@pstgmbh.ch',
145152
'website' => 'https://www.pstgmbh.ch',
146153
],
147-
'image' => 'https://res.cloudinary.com/codebar/image/upload/w_400,h_400,f_auto,q_auto/www-paperflakes-ch/people/codebar.webp',
154+
'image' => 'https://res.cloudinary.com/codebar/image/upload/w_400,f_auto,q_auto/www-codebar-ch/contacts/pst_gmbh.webp',
148155
]
149156
);
150157

@@ -154,8 +161,8 @@ public function run(): void
154161
'name' => 'Julian Leipert',
155162
'published' => true,
156163
'sections' => [
157-
ContactSectionEnum::EMPLOYEES => [
158-
'key' => ContactSectionEnum::EMPLOYEES,
164+
ContactSectionEnum::SOFTWARE_ENGINERING => [
165+
'key' => ContactSectionEnum::SOFTWARE_ENGINERING,
159166
'role' => [
160167
'de_CH' => 'Applikationsentwickler',
161168
'en_CH' => 'Application Developer',
@@ -170,5 +177,90 @@ public function run(): void
170177
]
171178
);
172179

180+
Contact::updateOrCreate(
181+
['id' => 8],
182+
[
183+
'name' => 'Dario Wieland',
184+
'published' => true,
185+
'sections' => [
186+
ContactSectionEnum::COLLABORATIONS => [
187+
'key' => ContactSectionEnum::COLLABORATIONS,
188+
'role' => [
189+
'de_CH' => 'Wieland Business Solutions GmbH',
190+
'en_CH' => 'Wieland Business Solutions GmbH',
191+
],
192+
],
193+
],
194+
'icons' => [
195+
'email' => 'wieland@business-solutions.gmbh',
196+
'website' => 'https://www.business-solutions.gmbh',
197+
],
198+
'image' => 'https://res.cloudinary.com/codebar/image/upload/w_400,h_400,f_auto,q_auto/www-paperflakes-ch/people/wds.jpg',
199+
]
200+
);
201+
202+
Contact::updateOrCreate(
203+
['id' => 9],
204+
[
205+
'name' => 'DR-G2110',
206+
'published' => true,
207+
'sections' => [
208+
ContactSectionEnum::SCANNING => [
209+
'key' => ContactSectionEnum::SCANNING,
210+
'role' => [
211+
'de_CH' => 'Digitalisierungs-Beauftragter',
212+
'en_CH' => 'Head of Digital Transformation',
213+
],
214+
],
215+
],
216+
'icons' => [],
217+
'image' => 'https://res.cloudinary.com/codebar/image/upload/w_400,h_400,f_auto,q_auto/www-paperflakes-ch/people/drg_e_background_removal_f_png.webp',
218+
]
219+
);
220+
221+
Contact::updateOrCreate(
222+
['id' => 10],
223+
[
224+
'name' => 'Mischa Lanz',
225+
'published' => true,
226+
'sections' => [
227+
ContactSectionEnum::SCANNING => [
228+
'key' => ContactSectionEnum::SCANNING,
229+
'role' => [
230+
'de_CH' => 'zunscan.ch',
231+
'en_CH' => 'zunscan.ch',
232+
],
233+
],
234+
],
235+
'icons' => [
236+
'email' => 'mischa.lanz@codebar.ch',
237+
'linkedin' => 'https://www.linkedin.com/in/mischa-lanz-672a65112',
238+
],
239+
'image' => 'https://res.cloudinary.com/codebar/image/upload/w_400,h_400,f_auto,q_auto/www-paperflakes-ch/people/6528f7c6bddf8430fb5d154c_Mischa_Hemd.webp',
240+
]
241+
);
242+
243+
Contact::updateOrCreate(
244+
['id' => 11],
245+
[
246+
'name' => 'Dominique Ernst',
247+
'published' => true,
248+
'sections' => [
249+
ContactSectionEnum::DIGITAL_TRANSFORMATION => [
250+
'key' => ContactSectionEnum::DIGITAL_TRANSFORMATION,
251+
'role' => [
252+
'de_CH' => 'DMS/ECM Berater',
253+
'en_CH' => 'DMS/ECM Consultant',
254+
],
255+
],
256+
],
257+
'icons' => [
258+
'email' => 'dominique.ernst@codebar.ch',
259+
'linkedin' => 'https://www.linkedin.com/in/dominique-ernst',
260+
],
261+
'image' => 'https://res.cloudinary.com/codebar/image/upload/w_400,h_400,f_auto,q_auto/www-paperflakes-ch/people/ujywqubl5rkkm5hjqjsa_e_background_removal_f_png.webp',
262+
]
263+
);
264+
173265
}
174266
}

database/seeders/Codebar/NewsTableSeeder.php

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,31 @@ public function run(): void
1717
{
1818

1919
$this->seed(
20-
publishedAt: Carbon::parse('2025-04-06'),
20+
publishedAt: null,
21+
author: 'Sebastian Bürgin-Fix',
22+
localizedData: [
23+
'de_CH' => [
24+
'title' => 'DocuWare 7.13 ist da',
25+
'slug' => 'docuware-7-13-ist-da',
26+
'teaser' => 'Mehr Automatisierung, mehr Insights, mehr Effizienz',
27+
'image' => 'https://res.cloudinary.com/codebar/image/upload/c_scale,dpr_2.0,f_auto,q_auto,w_1200/www-paperflakes-ch/seo/seo_paperflakes.webp',
28+
'content' => file_get_contents(database_path('files/news/de_CH/20250406_docuware_712.md')),
29+
'tags' => ['DMS/ECM', 'DocuWare'],
30+
],
31+
'en_CH' => [
32+
'title' => 'DocuWare 7.13 is here',
33+
'slug' => 'docuware-7-13-is-here',
34+
'teaser' => 'More automation, more insights, more efficiency',
35+
'image' => 'https://res.cloudinary.com/codebar/image/upload/c_scale,dpr_2.0,f_auto,q_auto,w_1200/www-paperflakes-ch/seo/seo_paperflakes.webp',
36+
'content' => file_get_contents(database_path('files/news/en_CH/20250406_docuware_712.md')),
37+
'tags' => ['DMS/ECM', 'DocuWare'],
38+
39+
],
40+
]
41+
);
42+
43+
$this->seed(
44+
publishedAt: Carbon::parse('2021-01-01'),
2145
author: 'Sebastian Bürgin-Fix',
2246
localizedData: [
2347
'de_CH' => [
@@ -26,6 +50,30 @@ public function run(): void
2650
'teaser' => 'Computerprogramme werden vielfach in fernen Ländern entwickelt, nicht aber bei codebar. Hier gibt es «Software made in Basel». Wir haben Sebastian Fix, den Geschäftsführer dieses Start-ups, nach der Idee dahinter gefragt.',
2751
'image' => 'https://res.cloudinary.com/codebar/image/upload/c_scale,dpr_2.0,f_auto,q_auto,w_1200/www-paperflakes-ch/seo/seo_paperflakes.webp',
2852
'content' => file_get_contents(database_path('files/news/de_CH/20250406_docuware_712.md')),
53+
'tags' => ['Regional', 'Software'],
54+
],
55+
'en_CH' => [
56+
'title' => 'Hello World! Introducing codebar.',
57+
'slug' => 'hello-world-codebar-introduces-itself',
58+
'teaser' => 'Computer programs are often developed in distant countries, but not at codebar. Here you\'ll find "Software made in Basel". We asked Sebastian Fix, the managing director of this start-up, about the idea behind it.',
59+
'image' => 'https://res.cloudinary.com/codebar/image/upload/c_scale,dpr_2.0,f_auto,q_auto,w_1200/www-paperflakes-ch/seo/seo_paperflakes.webp',
60+
'content' => file_get_contents(database_path('files/news/en_CH/20250406_docuware_712.md')),
61+
'tags' => ['Regional', 'Software'],
62+
63+
],
64+
]
65+
);
66+
67+
$this->seed(
68+
publishedAt: Carbon::parse('2025-04-06'),
69+
author: 'Sebastian Bürgin-Fix',
70+
localizedData: [
71+
'de_CH' => [
72+
'title' => 'DocuWare 7.12 ist da',
73+
'slug' => 'docuware-7-12-ist-da',
74+
'teaser' => 'Mehr Automatisierung, mehr Insights, mehr Effizienz',
75+
'image' => 'https://res.cloudinary.com/codebar/image/upload/c_scale,dpr_2.0,f_auto,q_auto,w_1200/www-paperflakes-ch/seo/seo_paperflakes.webp',
76+
'content' => file_get_contents(database_path('files/news/de_CH/20250406_docuware_712.md')),
2977
'tags' => ['DMS/ECM', 'DocuWare'],
3078
],
3179
'en_CH' => [
@@ -41,32 +89,31 @@ public function run(): void
4189
);
4290

4391
$this->seed(
44-
publishedAt: Carbon::parse('2025-04-06'),
92+
publishedAt: Carbon::parse('2021-01-01'),
4593
author: 'Sebastian Bürgin-Fix',
4694
localizedData: [
4795
'de_CH' => [
4896
'title' => 'DocuWare und codebar Solutions AG: Zwei Partner, eine Mission',
4997
'slug' => 'docu-ware-cloud-partner',
50-
'teaser' => 'Die codebar Solutions AG ist seit Februar 2023 offizieller Partner der Dokumenten-Management-Lösung (DMS) DocuWare Cloud. Dadurch haben unsere Kund*innen ab sofort ein Tool an der Hand, welches ihnen helfen wird, die Digitalisierung im eigenen Unternehmen voranzutreiben.',
98+
'teaser' => 'Die codebar Solutions AG ist seit Februar 2023 offizieller Partner von DocuWare Cloud. Unsere Kund*innen erhalten damit ein Tool zur Digitalisierung ihres Unternehmens.',
5199
'image' => 'https://res.cloudinary.com/codebar/image/upload/c_scale,dpr_2.0,f_auto,q_auto,w_1200/www-paperflakes-ch/seo/seo_paperflakes.webp',
52100
'content' => file_get_contents(database_path('files/news/de_CH/20250406_docuware_712.md')),
53101
'tags' => ['DMS/ECM', 'DocuWare'],
54102
],
55103
'en_CH' => [
56-
'title' => 'DocuWare 7.12 is here',
57-
'slug' => 'docuware-7-12-is-here',
58-
'teaser' => 'More automation, more insights, more efficiency',
104+
'title' => 'DocuWare and codebar Solutions AG: Two Partners, One Mission',
105+
'slug' => 'docuware-and-codebar-solutions-ag-two-partners-one-mission',
106+
'teaser' => 'codebar Solutions AG has been an official DocuWare Cloud partner since February 2023. Our customers now have a tool to advance digitalization in their companies.',
59107
'image' => 'https://res.cloudinary.com/codebar/image/upload/c_scale,dpr_2.0,f_auto,q_auto,w_1200/www-paperflakes-ch/seo/seo_paperflakes.webp',
60108
'content' => file_get_contents(database_path('files/news/en_CH/20250406_docuware_712.md')),
61109
'tags' => ['DMS/ECM', 'DocuWare'],
62-
63110
],
64111
]
65112
);
66113

67114
}
68115

69-
private function seed(Carbon $publishedAt, string $author, array $localizedData): void
116+
private function seed(?Carbon $publishedAt, string $author, array $localizedData): void
70117
{
71118
$entries = collect($localizedData)->map(function ($data, $locale) use ($author, $publishedAt) {
72119
$slug = Str::slug(Arr::get($data, 'slug'), '-', $locale);

database/seeders/Codebar/OpenSourceTableSeeder.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use App\Models\OpenSource;
66
use Illuminate\Database\Seeder;
77
use Illuminate\Support\Arr;
8+
use Illuminate\Support\Str;
89

910
class OpenSourceTableSeeder extends Seeder
1011
{
@@ -366,24 +367,33 @@ public function run(): void
366367
);
367368
}
368369

369-
private function seed(string $identifier, array $localizedData): void
370-
{
371-
$entries = collect($localizedData)->map(function ($data, $locale) use ($identifier) {
370+
private function seed(
371+
string $sharedSlug,
372+
array $localizedData,
373+
?string $link = null,
374+
?int $downloads = null,
375+
?string $version = null,
376+
?string $identifier = null
377+
): void {
378+
$slug = Str::slug($sharedSlug);
379+
380+
$entries = collect($localizedData)->map(function ($data, $locale) use ($slug, $link, $downloads, $version) {
372381

373382
return OpenSource::updateOrCreate(
374383
[
375384
'locale' => $locale,
376-
'identifier' => $identifier,
377-
385+
'slug' => $slug,
378386
],
379387
[
380-
'slug' => $slug,
381388
'published' => true,
382389
'title' => Arr::get($data, 'title'),
383390
'teaser' => Arr::get($data, 'teaser'),
384391
'image' => Arr::get($data, 'image'),
385392
'tags' => Arr::get($data, 'tags', []),
386393
'content' => Arr::get($data, 'content'),
394+
'link' => $link,
395+
'downloads' => $downloads,
396+
'version' => $version,
387397
]
388398
);
389399
});

0 commit comments

Comments
 (0)