Public Access
feat(freelancer-directory): CSV wire shape for languages/specialities, wire the quote route, add invite-a-friend
- languages/specialities now POST as comma-separated STRINGS ("English,German"),
not arrays; the build script splits them into separate filter options and tags.
- the client request form is no longer inert: it posts to odoo_experts_quote with
an explicit freelancer pick-list (never an implicit all) and a client address.
- new invite-a-friend form posts to odoo_experts_invite_friend (sender name +
friend email); we send the invitation, not the sender's address.
- both new forms show success only on a returned 200 (n8n answers 200 before the
workflow runs) and promise no timing.
- build-directory.py: render the pick-list, fix the country option casing.
- pages stay drafts (noindex, not in sitemap/llms, no inbound links).
This commit is contained in:
1 parent
832bb41206
commit
63e43ce7a1
2 files changed
+261
-16
No files matched your search
@@ -324,7 +324,10 @@
|
||||
var ODOO_EXPERTS_WEBHOOK =
|
||||
"https://n8n.odoo4projects.com/webhook/ODOO4projects/odoo_experts";
|
||||
|
||||
var MULTI_FIELDS = ["languages", "specialities", "odoo_versions"]; // comma-separated → array
|
||||
var MULTI_FIELDS = ["odoo_versions"]; // comma-separated → array
|
||||
// `languages` and `specialities` are COMMA-SEPARATED STRINGS on the wire
|
||||
// ("English,German"), NOT arrays. `odoo_versions` stays an array.
|
||||
var CSV_STRING_FIELDS = ["languages", "specialities"];
|
||||
var BOOL_FIELDS = ["OCA_member", "is_individual"];
|
||||
var NUM_FIELDS = ["odoo4projects_clients"];
|
||||
var TEXT_FIELDS = [
|
||||
@@ -456,6 +459,19 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (CSV_STRING_FIELDS.indexOf(name) !== -1) {
|
||||
// Normalise to the wire shape: trim each entry, drop blanks, re-join.
|
||||
var norm = (els[0].value || "")
|
||||
.split(",")
|
||||
.map(function (s) {
|
||||
return s.trim();
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join(",");
|
||||
if (norm) payload[name] = norm; // an empty box must not wipe the field
|
||||
return;
|
||||
}
|
||||
|
||||
if (BOOL_FIELDS.indexOf(name) !== -1) {
|
||||
var box = els[0];
|
||||
if (withId && box.dataset.loaded !== undefined) {
|
||||
|
||||
Reference in new issue
Block a user