Skip to content

Commit

Permalink
Merge pull request #989 from NFDI4Chem/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
NishaSharma14 authored Jan 3, 2024
2 parents 19ce251 + 28c9b98 commit c743581
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Actions/Fortify/UpdateUserProfileInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function update($user, array $input)
'name' => $input['username'] ? $input['username'] : $user->name,
'email' => $input['email'],
'orcid_id' => $input['orcid_id'],
'affiliation' => $input['affiliation'],
'affiliation' => $input['affiliation'] ? $input['affiliation'] : null,
])->save();
}
}
Expand Down
15 changes: 11 additions & 4 deletions resources/js/Pages/Auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@
class="border border-teal-500 rounded px-4 py-3 mt-3 max-w-2xl text-sm text-gray-700 font-bold"
>
<p>
Warning: This site is for demonstration purpose
only. You can test most of the nmrXiv features but
DO NOT use the current site for your work. All the
data stored here can be reset anytime.
<span style="color: red">Warning:</span> This site
is for demonstration purpose only. You can test most
of the nmrXiv features but DO NOT use the current
site for your work. All the data stored here can be
reset anytime. For real data please visit
<a
href="https://nmrxiv.org"
target="_blank"
style="color: teal"
>nmrxiv.org.</a
>
</p>
</div>
</div>
Expand Down
16 changes: 16 additions & 0 deletions resources/js/Pages/Auth/Register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@
</div>
<jet-input-error :message="error.orcid" class="mt-2" />
</div>
<!-- Affiliation -->
<div class="col-span-6 sm:col-span-4">
<jet-label
class="after:content-['(optional)'] after:ml-0.5 after:text-gray-500"
for="affiliation"
value="Affiliation"
/>
<jet-input
id="affiliation"
v-model="form.affiliation"
type="text"
class="mt-1 block w-full"
autocomplete="affiliation"
/>
<jet-input-error :message="error.affiliation" class="mt-2" />
</div>
<!-- Password -->
<div class="mt-4">
<jet-label
Expand Down
43 changes: 39 additions & 4 deletions resources/js/Pages/Console/Users/Partials/UserProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@

<!-- Orcid Id -->
<div class="col-span-6 sm:col-span-4">
<jet-label for="orcid" value="ORCID iD" />
<jet-label
class="after:content-['(optional)'] after:ml-0.5 after:text-gray-500"
for="orcid"
value="ORCID iD"
/>
<div class="mt-1 flex rounded-md shadow-sm">
<div
class="relative flex items-stretch flex-grow focus-within:z-10"
Expand Down Expand Up @@ -156,6 +160,26 @@
<jet-input-error :message="error.orcid" class="mt-2" />
</div>

<!-- Affiliation -->
<div class="col-span-6 sm:col-span-4">
<jet-label
class="after:content-['(optional)'] after:ml-0.5 after:text-gray-500"
for="affiliation"
value="Affiliation"
/>
<jet-input
id="affiliation"
v-model="form.affiliation"
type="text"
class="mt-1 block w-full"
autocomplete="affiliation"
/>
<jet-input-error
:message="form.errors.affiliation"
class="mt-2"
/>
</div>

<div v-if="!user" class="col-span-6 sm:col-span-4">
<jet-label for="password" value="Password" />
<jet-input
Expand Down Expand Up @@ -209,10 +233,11 @@
</template>
</jet-form-section>
<!-- Find ORCID iD Modal -->
<!-- <select-orcid-id
<select-orcid-id
ref="selectOrcidIdElement"
:orcidId="form.orcid_id"
/> -->
v-model:orcidId="form.orcid_id"
v-model:affiliation="form.affiliation"
/>
</template>

<script>
Expand All @@ -224,6 +249,7 @@ import JetLabel from "@/Jetstream/Label.vue";
import JetActionMessage from "@/Jetstream/ActionMessage.vue";
import JetSecondaryButton from "@/Jetstream/SecondaryButton.vue";
import SelectOrcidId from "@/Shared/SelectOrcidId.vue";
import { ref } from "vue";
export default {
components: {
Expand All @@ -235,6 +261,14 @@ export default {
JetLabel,
JetSecondaryButton,
SelectOrcidId,
ref,
},
setup() {
const selectOrcidIdElement = ref(null);
return {
selectOrcidIdElement,
};
},
props: ["user"],
Expand All @@ -248,6 +282,7 @@ export default {
email: this.user ? this.user.email : "",
username: this.user ? this.user.username : "",
orcid_id: this.user ? this.user.orcid_id : "",
affiliation: this.user ? this.user.affiliation : "",
password: null,
password_confirmation: null,
terms: true,
Expand Down

0 comments on commit c743581

Please sign in to comment.