mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 01:08:26 +00:00 
			
		
		
		
	replace all links and buttons involved by OnTheFly component
This commit is contained in:
		| @@ -65,9 +65,14 @@ | ||||
|                   @updateSelected="updateSelected"> | ||||
|                </person-suggestion> | ||||
|  | ||||
|                <button v-if="query.length >= 3" class="sc-button bt-create ml-5 mt-2" name="createPerson"> | ||||
|                   {{ $t('action.create') }} "{{ query }}" | ||||
|                </button> | ||||
|                <div class="create-button"> | ||||
|                   <on-the-fly | ||||
|                      v-if="query.length >= 3"  | ||||
|                      v-bind:buttonText="$t('onthefly.create.button', {q: query})" | ||||
|                      action="create"> | ||||
|                   </on-the-fly> | ||||
|                </div> | ||||
|                 | ||||
|             </div> | ||||
|          </template> | ||||
|  | ||||
| @@ -84,6 +89,7 @@ | ||||
|  | ||||
| <script> | ||||
| import Modal from 'ChillMainAssets/vuejs/_components/Modal'; | ||||
| import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue'; | ||||
| import PersonSuggestion from './AddPersons/PersonSuggestion'; | ||||
| import { searchPersons, searchPersons_2 } from 'ChillPersonAssets/vuejs/_api/AddPersons'; | ||||
|  | ||||
| @@ -92,6 +98,7 @@ export default { | ||||
|    components: { | ||||
|       Modal, | ||||
|       PersonSuggestion, | ||||
|       OnTheFly | ||||
|    }, | ||||
|    props: [ | ||||
|       'buttonTitle', | ||||
| @@ -251,4 +258,8 @@ export default { | ||||
|          } | ||||
|       } | ||||
|    } | ||||
|    .create-button > a { | ||||
|       margin-top: 0.5em; | ||||
|       margin-left: 2.6em; | ||||
|    } | ||||
| </style> | ||||
|   | ||||
| @@ -14,22 +14,23 @@ | ||||
|       <span class="badge badge-pill badge-secondary" :title="item.key"> | ||||
|          {{ $t('item.type_person') }} | ||||
|       </span> | ||||
|       <a class="sc-button bt-show" target="_blank" :title="item.key" :href="url.show"></a> | ||||
|       <on-the-fly | ||||
|          type="person" | ||||
|          v-bind:id="item.result.id" | ||||
|          action="show"> | ||||
|       </on-the-fly> | ||||
|        | ||||
|    </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue'; | ||||
|  | ||||
| export default { | ||||
|    name: 'SuggestionPerson', | ||||
|    props: ['item'], | ||||
|    data() { | ||||
|       return { | ||||
|          url: { | ||||
|             show: '/fr/person/' + this.item.result.person_id + '/general', | ||||
|             edit: '/fr/person/' + this.item.result.person_id + '/general/edit' | ||||
|          }, | ||||
|       } | ||||
|    components: { | ||||
|       OnTheFly | ||||
|    }, | ||||
|    props: ['item'] | ||||
| } | ||||
| </script> | ||||
|   | ||||
| @@ -15,22 +15,23 @@ | ||||
|       <span class="badge badge-pill badge-secondary" :title="item.key"> | ||||
|          {{ $t('item.type_thirdparty') }} | ||||
|       </span> | ||||
|       <a class="sc-button bt-show" target="_blank" :title="item.key" :href="url.show"></a> | ||||
|       <on-the-fly | ||||
|          type="thirdparty" | ||||
|          v-bind:id="item.result.id" | ||||
|          action="show"> | ||||
|       </on-the-fly> | ||||
|        | ||||
|    </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue'; | ||||
|  | ||||
| export default { | ||||
|    name: 'SuggestionThirdParty', | ||||
|    props: ['item'], | ||||
|    data() { | ||||
|       return { | ||||
|          url: { | ||||
|             show: '/fr/thirdparty/thirdparty/' + this.item.result.thirdparty_id + '/show', | ||||
|             edit: '/fr/thirdparty/thirdparty/' + this.item.result.thirdparty_id + '/edit' | ||||
|          }, | ||||
|       } | ||||
|    components: { | ||||
|       OnTheFly | ||||
|    }, | ||||
|    props: ['item'] | ||||
| } | ||||
| </script> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user