Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass keys instead of values to post-register endpoint #3073

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions app/qml/onboarding/MMHowYouFoundUs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,21 @@ Page {

model: ListModel {
Component.onCompleted: {
listView.model.append({name: qsTr("Search engine (Google, ...)"), icon: __style.searchIcon, submenu: false})
listView.model.append({name: qsTr("Blog"), icon: __style.termsIcon, submenu: false})
listView.model.append({name: qsTr("Mouth"), icon: __style.mouthIcon, submenu: false})
listView.model.append({name: qsTr("QGIS website"), icon: __style.qgisIcon, submenu: false})
listView.model.append({name: qsTr("Application store"), icon: __style.subscriptionsIcon, submenu: false})
listView.model.append({name: qsTr("Teacher"), icon: __style.teacherIcon, submenu: false})
listView.model.append({name: qsTr("Conference"), icon: __style.briefcaseIcon, submenu: false})
listView.model.append({name: qsTr("Social media"), icon: __style.socialMediaIcon, submenu: false})
listView.model.append({name: qsTr("YouTube"), icon: __style.youtubeIcon, submenu: true})
listView.model.append({name: qsTr("Twitter"), icon: __style.xTwitterIcon, submenu: true})
listView.model.append({name: qsTr("Facebook"), icon: __style.facebookIcon, submenu: true})
listView.model.append({name: qsTr("LinkedIn"), icon: __style.linkedinIcon, submenu: true})
listView.model.append({name: qsTr("Mastodon"), icon: __style.mastodonIcon, submenu: true})
listView.model.append({name: qsTr("Reddit"), icon: __style.redditIcon, submenu: true})
listView.model.append({name: qsTr("Other"), icon: __style.otherIcon, submenu: false})
listView.model.append({name: qsTr("Search engine (Google, ...)"), key: "search_engine", icon: __style.searchIcon, submenu: false})
listView.model.append({name: qsTr("Blog"), key: "blog", icon: __style.termsIcon, submenu: false})
listView.model.append({name: qsTr("Mouth"), key: "mouth", icon: __style.mouthIcon, submenu: false})
listView.model.append({name: qsTr("QGIS website"), key: "qgis_website", icon: __style.qgisIcon, submenu: false})
listView.model.append({name: qsTr("Application store"), key: "app_store", icon: __style.subscriptionsIcon, submenu: false})
listView.model.append({name: qsTr("Teacher"), key: "teacher", icon: __style.teacherIcon, submenu: false})
listView.model.append({name: qsTr("Conference"), key: "conference", icon: __style.briefcaseIcon, submenu: false})
listView.model.append({name: qsTr("Social media"), key: "social", icon: __style.socialMediaIcon, submenu: false})
listView.model.append({name: qsTr("YouTube"), key: "youtube", icon: __style.youtubeIcon, submenu: true})
listView.model.append({name: qsTr("Twitter"), ikey: "twitter", icon: __style.xTwitterIcon, submenu: true})
listView.model.append({name: qsTr("Facebook"), key: "facebook", icon: __style.facebookIcon, submenu: true})
listView.model.append({name: qsTr("LinkedIn"), key: "linkedIn", icon: __style.linkedinIcon, submenu: true})
listView.model.append({name: qsTr("Mastodon"), key: "mastodon", icon: __style.mastodonIcon, submenu: true})
listView.model.append({name: qsTr("Reddit"), key: "reddit", icon: __style.redditIcon, submenu: true})
listView.model.append({name: qsTr("Other"), key: "other", icon: __style.otherIcon, submenu: false})
}
}

Expand Down Expand Up @@ -131,11 +131,11 @@ Page {
listView.positionViewAtEnd()
}
else {
if (model.icon === __style.socialMediaIcon) {
if ( model.key === "social" ) {
// need to select subcategory
root.selectedText = ""
} else {
root.selectedText = model.name
root.selectedText = model.key
}
}
}
Expand Down
24 changes: 12 additions & 12 deletions app/qml/onboarding/MMWhichIndustry.qml
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ Page {

model: ListModel {
Component.onCompleted: {
listView.model.append({name: qsTr("Agriculture"), icon: __style.tractorIcon, colorx: __style.sunColor, color: "#F4CB46"})
listView.model.append({name: qsTr("Archaeology"), icon: __style.archaeologyIcon, colorx: __style.sandColor, color: "#FFF4E2"})
listView.model.append({name: qsTr("Construction and engineering"), icon: __style.engineeringIcon, colorx: __style.roseColor, color: "#FFBABC"})
listView.model.append({name: qsTr("Electric utilities"), icon: __style.electricityIcon, colorx: __style.nightColor, color: "#12181F"})
listView.model.append({name: qsTr("Environmental protection"), icon: __style.environmentalIcon, colorx: __style.fieldColor, color: "#9BD1A9"})
listView.model.append({name: qsTr("Local governments"), icon: __style.stateAndLocalIcon, colorx: __style.purpleColor, color: "#CCBDF5"})
listView.model.append({name: qsTr("Natural resources"), icon: __style.naturalResourcesIcon, colorx: __style.earthColor, color: "#4D2A24"})
listView.model.append({name: qsTr("Telecom"), icon: __style.telecommunicationIcon, colorx: __style.deepOceanColor, color: "#1C324A"})
listView.model.append({name: qsTr("Transportation"), icon: __style.transportationIcon, colorx: __style.skyColor, color: "#A6CBF4"})
listView.model.append({name: qsTr("Water utilities"), icon: __style.waterResourcesIcon, colorx: __style.lightGreenColor, color: "#EFF5F3"})
listView.model.append({name: qsTr("Other"), icon: __style.otherIcon, colorx: __style.sunsetColor, color: "#FFB673"})
listView.model.append({name: qsTr("Agriculture"), key: "agriculture", icon: __style.tractorIcon, colorx: __style.sunColor, color: "#F4CB46"})
listView.model.append({name: qsTr("Archaeology"), key: "archaeology", icon: __style.archaeologyIcon, colorx: __style.sandColor, color: "#FFF4E2"})
listView.model.append({name: qsTr("Construction and engineering"), key: "engineering", icon: __style.engineeringIcon, colorx: __style.roseColor, color: "#FFBABC"})
listView.model.append({name: qsTr("Electric utilities"), key: "electricity", icon: __style.electricityIcon, colorx: __style.nightColor, color: "#12181F"})
listView.model.append({name: qsTr("Environmental protection"), key: "environmental", icon: __style.environmentalIcon, colorx: __style.fieldColor, color: "#9BD1A9"})
listView.model.append({name: qsTr("Local governments"), key: "gov", icon: __style.stateAndLocalIcon, colorx: __style.purpleColor, color: "#CCBDF5"})
listView.model.append({name: qsTr("Natural resources"), key: "natural", icon: __style.naturalResourcesIcon, colorx: __style.earthColor, color: "#4D2A24"})
listView.model.append({name: qsTr("Telecom"), key: "telecom", icon: __style.telecommunicationIcon, colorx: __style.deepOceanColor, color: "#1C324A"})
listView.model.append({name: qsTr("Transportation"), key: "transportation", icon: __style.transportationIcon, colorx: __style.skyColor, color: "#A6CBF4"})
listView.model.append({name: qsTr("Water utilities"), key: "water", icon: __style.waterResourcesIcon, colorx: __style.lightGreenColor, color: "#EFF5F3"})
listView.model.append({name: qsTr("Other"), key: "other", icon: __style.otherIcon, colorx: __style.sunsetColor, color: "#FFB673"})
}
}

Expand Down Expand Up @@ -133,7 +133,7 @@ Page {
// for other you need to type string
root.selectedText = ""
} else {
root.selectedText = model.name
root.selectedText = model.key
}
}
}
Expand Down
Loading