Skip to content

Commit

Permalink
pass keys instead of values to post-register endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros committed Feb 23, 2024
1 parent 514445b commit f33d9fc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
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

1 comment on commit f33d9fc

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 24.02.530811 just submitted!

Please sign in to comment.