Skip to content

Commit

Permalink
Add validation to display map, update styles for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariazel Hernández authored and Mariazel Hernández committed Aug 10, 2023
1 parent b55b553 commit f0761c5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/api/routes/employees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,16 @@ employeesRouter.post("/find-employee/employee-detail/:department/:full_name", [p

await axios.get(`https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address={${resultEmployees[0].community},${resultEmployees[0].address}}&outFields={}&f=json&token=${ESRI_KEY}`)
.then((response: any) => {
const center = response.data.candidates[0].location
resultEmployees[0].center.lat = center.y
resultEmployees[0].center.lng = center.x

if(response.data.candidates){
const center = response.data.candidates[0].location
resultEmployees[0].center.lat = center.y;
resultEmployees[0].center.lng = center.x;
}
else{
console.log('Error in ESRI:' + JSON.stringify(response.data));
resultEmployees[0].center = null;
}
}).catch((error: any) => {
console.log(error)
})
Expand Down
10 changes: 10 additions & 0 deletions src/web/src/assets/yk-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,14 @@ a {
text-decoration: none !important;
color: black !important;
cursor: default !important;
}

a{
color:#005a65 !important;
}
a:visited{
color:#643f5d !important;
}
a:hover{
color:#008392 !important;
}
2 changes: 1 addition & 1 deletion src/web/src/components/UI/DivisionsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-col>
<v-card elevation="1" width="100%" class="py-10">
<v-row>
<v-col cols="6" v-for="(item, parent_item, id) in items" :key="id" class="px-8 py-1">
<v-col cols="12" md="6" v-for="(item, parent_item, id) in items" :key="id" class="px-8 py-1">

<v-card outlined color="transparent">
<li>
Expand Down

0 comments on commit f0761c5

Please sign in to comment.