Skip to content

Commit

Permalink
Merge pull request #7901 from fjordllc/company-logo-position
Browse files Browse the repository at this point in the history
登録情報変更画面で別のコースを選択してもRailsエンジニアコースと表示されてしまうバグを修正
  • Loading branch information
machida authored Jul 2, 2024
2 parents 88aae17 + 579585e commit fe3b0c8
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/javascript/components/MentorCourses.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function MentorCourses() {
const courses = data.courses

return (
<div className="admin-table">
<div className="admin-table is-react">
<table className="admin-table__table">
<Header />
<tbody className="admin-table__items">
Expand All @@ -43,7 +43,7 @@ function MentorCourse(props) {

return (
<tr className="admin-table__item">
<td className="admin-table__item-value">
<td className="admin-table__item-value w-32">
<a href={url}>{course.title}</a>
</td>
<td className="admin-table__item-value">{course.description}</td>
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/User.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function User({ user, currentUser }) {

return (
<div className="col-xxl-3 col-xl-4 col-lg-4 col-md-6 col-xs-12">
<div className="users-item">
<div className="users-item is-react">
<div className={`users-item__inner a-card ${roleClass()}`}>
{currentUser &&
(currentUser.mentor || currentUser.admin) &&
Expand Down
14 changes: 8 additions & 6 deletions app/javascript/components/user.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template lang="pug">
.col-xxxl-2.col-xxl-3.col-xl-4.col-lg-4.col-md-6.col-xs-12
.users-item
.users-item.is-vue
.users-item__inner.a-card
.users-item__inactive-message-container.is-only-mentor(
v-if='(currentUser.mentor || currentUser.admin) && user.student_or_trainee')
Expand All @@ -26,10 +26,6 @@
.card-list-item__row
.card-list-item-title
.card-list-item-title__end
a(
v-if='user.company && user.company.logo_url',
:href='user.company.url')
img.user-item__company-logo(:src='user.company.logo_url')
a.card-list-item-title__title.is-lg.a-text-link(
:href='user.url')
| {{ loginName }}
Expand All @@ -39,6 +35,9 @@
.card-list-item-meta__item
.a-meta
| {{ user.name }}
.card-list-item__row
.card-list-item-meta
.card-list-item-meta__items
.card-list-item-meta__item
a.a-meta(
v-if='user.discord_profile.times_url',
Expand All @@ -50,7 +49,10 @@
.a-meta__icon
i.fa-brands.fa-discord
| {{ user.discord_profile.account_name }}

a(
v-if='user.company && user.company.logo_url',
:href='user.company.url')
img.user-item__company-logo(:src='user.company.logo_url')
user-sns(:user='user')
user-activity-counts(:user='user')
.users-item__body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
margin-inline: 0
&.is-grab
padding: 0
&.w-32
width: 128px

.admin-table__item-blank
+text-block(.75rem 1.45)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@
display: block

.header-dropdown__inner
overflow-y: auto
+media-breakpoint-up(md)
+position(absolute, right 0, top 100%, 2)
background-color: var(--base)
border: solid 1px var(--border-shade)
width: 14rem
box-shadow: rgba(black, .2) 0 0 .375rem
border-radius: .25rem
max-height: calc(100vh - 6rem)
&.is-notification
width: 15rem
+media-breakpoint-down(sm)
background-color: var(--main)
+position(fixed, top 0, bottom 0, right auto, 1)
transition: left .2s ease-out
width: var(--global-nav-width-sm)
overflow-y: auto
left: calc(var(--global-nav-width-sm) * -1)
input:checked + .header-dropdown &,
.is-opened-dropdown &
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
= render 'checked_campaign'
.form__items
- if [email protected]?
= render 'users/form/course_select', f: f
= render 'users/form/course_select', f: f, user: @user
.form__items
= render 'users/form/login_name', f: f
= render 'users/form/email', f: f, user: user
Expand Down
13 changes: 8 additions & 5 deletions app/views/users/_user.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.col-xxl-3.col-xl-4.col-lg-4.col-md-6.col-xs-12
.users-item
.users-item.is-rails
.users-item__inner.a-card
.users-item__inactive-message-container.is-only-mentor
- if (current_user.mentor || current_user.admin) && user.student_or_trainee?
Expand All @@ -24,9 +24,6 @@
.card-list-item__row
.card-list-item-title
.card-list-item-title__end
- if user.company&.logo_url
= link_to company_path(user.company) do
img.user-item__company-logo src=user.company.logo_url
= link_to user.url, class: 'card-list-item-title__title is-lg a-text-link' do
| #{user.login_name}
.card-list-item__row
Expand All @@ -35,17 +32,23 @@
.card-list-item-meta__item
.a-meta
| #{user.name}
.card-list-item__row
.card-list-item-meta
.card-list-item-meta__items
.card-list-item-meta__item
- if user.discord_profile.times_url
= link_to user.discord_profile.times_url, class: 'a-meta' do
.a-meta__icon
i.fa-brands.fa-discord
| #{user.discord_profile.account_name}
- else
- elsif user.discord_profile.account_name
.a-meta
.a-meta__icon
i.fa-brands.fa-discord
| #{user.discord_profile.account_name}
- if user.company&.logo_url
= link_to company_path(user.company) do
img.user-item__company-logo src=user.company.logo_url
= render 'users/sns', user: user
- if user.student_or_trainee?
.card-counts.is-users.mt-3
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/form/_course_select.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.form-item-group
.form-item-group__body
.selected-item
- course = find_course(params[:course_id])
- course = user.course || find_course(params[:course_id])
= render 'users/form/course_selection', course: course, f: f
= render '/shared/modal',
id: 'modal-course-description',
Expand Down

0 comments on commit fe3b0c8

Please sign in to comment.