2222 179l-364 774q-16 33-47.5 52t-67.5 19-67.5-19-46.5-52l-365-774q-33-70-33-179 0-212 150-362t362-150
2323 362 150 150 362z" />
2424 </svg >
25- <span >{{ contractor.location }}</span >
25+ <span >{{ contractor.town }}, {{ contractor.country }}</span >
2626 </div >
2727
2828 <div class =" tcs-aside" >{{ contractor.tag_line }}</div >
29- <div v-for =" text_attribute in contractor.text_attributes" >
30- <h3 >{{ text_attribute.name }}</h3 >
31- {{ text_attribute.value }}
29+
30+ <div >
31+ {{ contractor.primary_description }}
32+ </div >
33+
34+ <div v-for =" attr in contractor_extra.extra_attributes" >
35+ <h3 >{{ attr.name }}</h3 >
36+ {{ attr.value }}
3237 </div >
3338
34- <table class =" tcs-skills" v-if =" contractor .skills" >
39+ <table class =" tcs-skills" v-if =" contractor_extra .skills" >
3540 <caption >
3641 <h3 >{{ $root.config.skills_label }}</h3 >
3742 </caption >
38- <tr v-for =" skill in contractor .skills" >
43+ <tr v-for =" skill in contractor_extra .skills" >
3944 <th scope =" row" >{{ skill.subject }}</th >
4045 <td >
4146 <span v-for =" qual_level in skill.qual_levels" >
4651 </table >
4752 </div >
4853 <div class =" tcs-extra" >
49- <img :src =" contractor.img " :alt =" contractor.name" >
54+ <img :src =" contractor.photo " :alt =" contractor.name" >
5055 <!-- <button>Contact {{ contractor.name }}</button>-->
5156 <p v-html =" contact_html" ></p >
5257 </div >
5358 </div >
5459 </div >
5560
5661 </div >
62+ <div v-else class =" tcs-container" >
63+ <p >Could not find contractor.</p >
64+ </div >
5765 </div >
5866 </transition >
5967</template >
@@ -68,13 +76,17 @@ export default {
6876 },
6977 computed: {
7078 contractor : function () {
71- // return _.find(this.$root.contractors, {'slug': this.$route.params.slug})
7279 for (var contractor of this .$root .contractors ) {
73- if (contractor .slug === this .$route .params .slug ) {
80+ if (contractor .link === this .$route .params .link ) {
81+ console .log (' con' , contractor)
82+ this .$root .get_details (contractor .url , contractor .link )
7483 return contractor
7584 }
7685 }
7786 },
87+ contractor_extra : function () {
88+ return this .$root .contractors_extra [this .$route .params .link ] || {}
89+ },
7890 contact_html : function () {
7991 let raw = this .$root .config .contact_html
8092 return raw .replace (' {name}' , this .contractor .name ).replace (' {contact_link}' , this .$root .config .contact_link )
@@ -142,7 +154,7 @@ $back-colour: 35;
142154.tcs-location {
143155 margin-bottom : 10px ;
144156 float : right ;
145- $svg-size : 24 px ;
157+ $svg-size : 22 px ;
146158 svg {
147159 width : $svg-size ;
148160 height : $svg-size ;
0 commit comments