Working with Join Fields, Relationship Fields, and the SEO Plugin in PayloadCMS

  Рет қаралды 77

NLV Codes

NLV Codes

Күн бұрын

Пікірлер: 9
@timofeysmile8543
@timofeysmile8543 2 күн бұрын
New idea. What do you think about connecting payload to some Point of Sale system like Square? As for me it sounds interesting to see real time updating catalog, items quantity, online orders with changing status and quantity in both POS and CMS systems and etc.
@nlv_codes
@nlv_codes 2 күн бұрын
Thanks for the suggestion! It would be a new challenge for me too; I haven’t done much ecomm like that.
@RomainLENAOUR
@RomainLENAOUR 2 күн бұрын
Good job ! Do you have a github with code examples? It would be interesting to see how you structure your projects (components, blocks...).
@nlv_codes
@nlv_codes 2 күн бұрын
Thank you! I don’t yet, but I could put one of my projects up. I’ll get to work on that!
@nlv_codes
@nlv_codes Күн бұрын
Here's a link to the repo in the video, hope it helps! github.com/midlomarketing/midlomark/
@RomainLENAOUR
@RomainLENAOUR Күн бұрын
@@nlv_codes great !!!
@timofeysmile8543
@timofeysmile8543 3 күн бұрын
Thank you for your videos! These are great for beginners in PayloadCMS. Could you please advise me or even make video about my issue if you find it interesting. I have some collection for my pet project: Cars, Manufacturer, Models. All models contain manufacturer field and model name field. All cars contains manufacturer field and model field. How can I make it so I couldn`t pick model before I choose manufacturer and I could see only the models options that refer to manufacturer. Like if I`ve picked Audi I could see only its models options like A6 Q5 etc. and couldn`t see others manufacturer models. And if I decide to change manufacturer, the model field become clear.
@nlv_codes
@nlv_codes 2 күн бұрын
I'm glad you find these videos helpful! Your question and use-case is very interesting. I may try it out on my next live stream. I haven't tested this out, so I'm not sure if this will work. BUT you could use filterOptions and admin.condition. You would set your admin.condition so that your model relationship field is hidden until you select a value for your manufacturer. Then, in your model relationship field, you can use `filterOptions`, and use `data` or `siblingData` to get the value of your manufacturer field and use that as your filter for the model relationship field.
@timofeysmile8543
@timofeysmile8543 2 күн бұрын
@@nlv_codes Thank you!!! With your advise, docs and AI power I made this XD Here is the field: { name: 'model', type: 'relationship', relationTo: 'models', label: 'Model', required: true, admin: { condition: (_, { manufacturer }: { manufacturer?: string }) => !!manufacturer, // Поле отображается только если выбран производитель }, filterOptions: ({ siblingData, relationTo }: FilterOptionsProps) => { const manufacturerId = (siblingData as { manufacturer?: string }).manufacturer if (!manufacturerId) { return false // Не показываем модели, если производитель не выбран } // Фильтруем только те модели, которые принадлежат выбранному производителю if (relationTo === 'models') { return { manufacturer: { equals: manufacturerId, }, } } return true // Если условие не применимо, возвращаем все }, }, As for complete beginner it looks kinda messy, but at least it works XD
The Rich Text Editor With Image Upload | Next JS | React
2:18:31
Full Stack Niraj
Рет қаралды 3,6 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
This is How I Scrape 99% of Sites
18:27
John Watson Rooney
Рет қаралды 228 М.
How to Create Custom Blocks in PayloadCMS
10:13
NLV Codes
Рет қаралды 84
From 3.5 to 3.11: PayloadCMS Upgrade Walkthrough
10:57
NLV Codes
Рет қаралды 5
Introducing LVGL's UI Editor (Preview of v0.1)
24:21
LVGL
Рет қаралды 7 М.
An Overview of PayloadCMS Field and Collection Hooks
20:39
Мастер и Мандарины - Уральские Пельмени
1:34:39
Уральские Пельмени
Рет қаралды 1,2 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41