0001-backoffice-display-user-infos-in-autocomplete-49039.patch
wcs/qommon/static/js/qommon.admin.js | ||
---|---|---|
157 | 157 |
}, |
158 | 158 |
url: '/api/users/' |
159 | 159 |
}, |
160 |
placeholder: '-' |
|
160 |
placeholder: '-', |
|
161 |
templateResult: function (state) { |
|
162 |
console.log(state); |
|
163 |
if (!state.id) { |
|
164 |
return state.text; |
|
165 |
} |
|
166 |
var details = ''; |
|
167 |
if (state.user_email) { |
|
168 |
details += ' ' + state.user_email; |
|
169 |
} |
|
170 |
if (state.user_var_phone) { |
|
171 |
details += ' 📞 ' + state.user_var_phone; |
|
172 |
} |
|
173 |
if (state.user_var_mobile) { |
|
174 |
details += ' 📱 ' + state.user_var_mobile; |
|
175 |
} |
|
176 |
if (state.user_var_address || state.user_var_zipcode || state.user_var_city) { |
|
177 |
details += ' 📨'; |
|
178 |
} |
|
179 |
if (state.user_var_address) { |
|
180 |
details += ' ' + state.user_var_address; |
|
181 |
} |
|
182 |
if (state.user_var_zipcode) { |
|
183 |
details += ' ' + state.user_var_zipcode; |
|
184 |
} |
|
185 |
if (state.user_var_city) { |
|
186 |
details += ' ' + state.user_var_city; |
|
187 |
} |
|
188 |
return $('<span>' + state.text + '</span><br /><span>' + details + '</span>'); |
|
189 |
} |
|
161 | 190 |
} |
162 | 191 |
if ($('div.submit-user-selection').length) { |
163 | 192 |
$('div.submit-user-selection select').select2(select2_options); |
164 |
- |