Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2021-12-09 08:39:55 #3662

Merged
merged 75 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
892b00e
アイコンが長方形画像のユーザーを追加
taka61 Nov 25, 2021
e4ec043
js-shortcut-post-commentをaに置き換えた
yoshitaku-jp Nov 27, 2021
e190095
テストで指定する部分も修正
yoshitaku-jp Nov 27, 2021
37fcea9
シャープのIDが要らなかったので削除
yoshitaku-jp Nov 27, 2021
bf4180c
日報が0件の時の表示を変更
taka61 Nov 29, 2021
4d87c84
Railsで直近の日報を表示する
harukus May 2, 2021
eeb8a4c
showアクションメソッドの追加
harukus May 7, 2021
a2ad218
不要なインスタンス変数を削除
harukus May 7, 2021
8c96298
ルーティングの追加
harukus May 8, 2021
52e5706
モジュールの追加
harukus Sep 4, 2021
00d7963
jbuilderを使ってJSON形式のデータの取得
harukus May 9, 2021
40bd49d
Vue.jsでその人の直近数個の日報を表示
harukus May 9, 2021
1b0abbd
:cop:
harukus May 9, 2021
e1209fb
日報横の直近の日報にデザイン
machida May 20, 2021
5ad4a39
不要な?を削除
harukus Aug 11, 2021
c91c442
CurrentChangeの取り込み忘れを直した
harukus Aug 11, 2021
d065756
日報詳細の表示のずれを少し修正
harukus Aug 31, 2021
3191764
APIのURLの変更に伴う修正
harukus Aug 31, 2021
ea61c82
rubocop適用
harukus Aug 31, 2021
108370d
提出物と同じような見た目にするために修正
harukus Sep 1, 2021
28655de
日報個別ページを2カラムにした
machida Sep 7, 2021
6899732
不要なコメントを削除
harukus Sep 10, 2021
39e08de
リファクタリング
harukus Nov 1, 2021
048d92d
2カラム画面のデザイン調整
machida Nov 24, 2021
e2d7a1d
デザイン変更に伴うテスト変更
machida Nov 30, 2021
7478d95
日報一覧の操作アイコンのifがなかったのを入れた
machida Nov 30, 2021
e2eff43
long_nameに変更
yoshitaku-jp Nov 30, 2021
248b263
long_nameに変更
yoshitaku-jp Nov 30, 2021
b2b5fca
APIの戻り値としてHTMLをエスケープしないように変更
IkumaTadokoro Nov 30, 2021
839ba5c
管理者ではないメンターのテストユーザーの追加
ShotaTsuru Nov 24, 2021
a8d0e85
コンフリクトを解消しました
taka61 Dec 2, 2021
0708c2f
お知らせメールのフッターの年が動的に今年の年になるように変更
naomichi-h Dec 2, 2021
7dfd655
余計な改行を削除
naomichi-h Dec 2, 2021
c61dc9c
HTMLメール内のemojiのデザイン崩れを修正
machida Dec 3, 2021
7cdda48
Merge pull request #3661 from fjordllc/emoji-mail
machida Dec 3, 2021
25e2d05
年の動的な取得をlメソッドを使用して実装するように変更
naomichi-h Dec 3, 2021
4bcca71
Merge pull request #3635 from fjordllc/feature/change_display_of_repo…
komagata Dec 3, 2021
8913025
Merge pull request #3118 from fjordllc/feature/display-recent-reports
komagata Dec 3, 2021
d5d50f8
Merge pull request #3643 from fjordllc/bug/fix-report-title-escape
komagata Dec 3, 2021
45e4b9e
Merge pull request #3629 from fjordllc/bug/use-shortcuts-post-past-co…
komagata Dec 3, 2021
cac2eb5
Merge pull request #3644 from fjordllc/feature/display-username-on-qu…
komagata Dec 3, 2021
ddcf5bb
Merge pull request #3602 from fjordllc/feature/add_a_mentor_non-admin…
komagata Dec 3, 2021
b859471
Merge pull request #3645 from fjordllc/feature/display-username-on-qu…
komagata Dec 3, 2021
dd745f9
管理画面の企業一覧にあるDescriptionを削除
R-Tsukada Dec 4, 2021
32f9942
再びコンフリクトを解消
taka61 Dec 4, 2021
c7bf732
Merge pull request #3622 from fjordllc/feature/add_user_with_rectangu…
komagata Dec 4, 2021
d80cc9e
Merge pull request #3656 from fjordllc/feature/change_display_year_in…
komagata Dec 4, 2021
bf5d3fe
テストデータにアイコンが小さい画像のユーザーを追加
nga20167304 Dec 3, 2021
e8d170e
添付の画像の名前を変更する
nga20167304 Dec 3, 2021
f5f6d50
誤って削除した部分を再追加
nga20167304 Dec 3, 2021
d15096c
testを実行するとcassetteが更新される問題を修正
komagata Dec 5, 2021
53d3e27
Merge pull request #3669 from fjordllc/bug/wrong-cassettes
komagata Dec 5, 2021
7663ffe
サブスクステータスの表示を非同期化
komagata Oct 25, 2021
a0c987e
サブスクのテスト追加
komagata Oct 31, 2021
90219ba
cassetteが更新される問題を修正
komagata Nov 18, 2021
900ce60
Merge pull request #3444 from fjordllc/bug/subscription-status
komagata Dec 5, 2021
8c562ee
自分の担当の数値を変更
taka61 Dec 6, 2021
20a4a40
メンターダッシュボード、確認数の集計 へのリンクを削除
unstoppa61e Dec 6, 2021
abcb59b
Merge pull request #3660 from fjordllc/feature/add_user_small_icon_in…
komagata Dec 6, 2021
fc1f909
アドバイザー、メンター、卒業生のタブを表示
yoshitaku-jp Dec 6, 2021
09c76c2
大名エンジニアカレッジのデータに卒業生、メンター、アドバイザーを追加
yoshitaku-jp Dec 6, 2021
bb92737
Bump bootsnap
ima1zumi Dec 6, 2021
2bb7d10
adminとメンターの権限を整理した
machida Dec 7, 2021
01d2542
Merge pull request #3683 from fjordllc/organize_authority
machida Dec 8, 2021
407f40b
Merge pull request #3677 from fjordllc/bump-bootsnap
komagata Dec 8, 2021
957717b
Merge pull request #3673 from fjordllc/feature/delete_links_in_mentor…
komagata Dec 8, 2021
7b732da
Merge pull request #3672 from fjordllc/bug/fix_number_of_my_charge_on…
komagata Dec 8, 2021
47c86a6
Merge pull request #3678 from fjordllc/feature/display-categories-in-…
komagata Dec 8, 2021
5b1ac04
Merge pull request #3665 from fjordllc/hotfix/remove-company-description
komagata Dec 8, 2021
028570c
折返し設定を追加
machida Dec 9, 2021
8ff9611
メールの中の絵文字の扱いを修正
machida Dec 9, 2021
69039be
マメに保存の文字数を減らした
machida Dec 9, 2021
1e4ec92
Merge pull request #3718 from fjordllc/css-fix-mail
machida Dec 9, 2021
5c5f5ad
HTMLの構造を修正
machida Dec 9, 2021
ec9b9d9
Merge pull request #3725 from fjordllc/fix-notifications-dom
machida Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ GEM
ast (2.4.2)
bcrypt (3.1.16)
bindex (0.8.1)
bootsnap (1.7.2)
bootsnap (1.9.3)
msgpack (~> 1.0)
builder (3.2.4)
bullet (6.1.3)
Expand Down
6 changes: 5 additions & 1 deletion app/assets/stylesheets/atoms/_a-textarea-bottom-note.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
+media-breakpoint-down(md)
.a-textarea-bottom-note__banner
display: none

+media-breakpoint-up(lg)
.a-textarea-bottom-note
position: relative
Expand All @@ -9,5 +13,5 @@
+position(absolute, left 1px, bottom 1px, right 1px)
+border-radius(bottom, 3px)
padding: .5rem
+text-block(.8125rem 1.4, center)
+text-block(.75rem 1.4, center)
border-top: solid 1px $border-more-shade
1 change: 1 addition & 0 deletions app/assets/stylesheets/blocks/form/_form-actions.sass
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
display: flex
align-items: flex-end
justify-content: center
flex-wrap: wrap
&.is-ais-flex-start
align-items: flex-start
+media-breakpoint-down(sm)
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/blocks/form/_form-tabs.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
display: flex
margin-bottom: 1rem
border-bottom: solid 1px $border
.a-card > &:first-child
.a-card > &:first-child,
.a-card__inner > &:first-child
margin-top: 1rem

.form-tabs__tab
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/blocks/side/_side-tabs-contents.sass
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
border-top-left-radius: 0
max-height: calc(100vh - 100px)
overflow-y: auto
.card-header
display: none

#side-tabs-1:checked ~ .side-tabs-contents #side-tabs-content-1
display: block
Expand Down
5 changes: 2 additions & 3 deletions app/assets/stylesheets/blocks/side/_side-tabs-nav.sass
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.side-tabs-nav__items
display: flex
+position(relative, 2)
margin-bottom: -1px
+margin(horizontal, auto)
max-width: 50rem

Expand All @@ -18,10 +17,10 @@
color: $default-text

.side-tabs-nav__item-link
+text-block(.875rem 1.4, flex)
+text-block(.8125rem 1.4, flex 600)
cursor: pointer
padding: .75em 1.25em
border: solid 1px $border-shade
border: solid 1px $border-more-shade
border-bottom: none
+position(relative, bottom -1px)
+border-radius(top, .25rem)
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/blocks/thread/_thread-list-item.sass
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
padding-left: 3.75rem
+media-breakpoint-up(md)
min-height: 2.75rem
.has-no-author-image &
padding-left: 0
+media-breakpoint-down(sm)
padding-left: 3rem

Expand Down Expand Up @@ -113,6 +115,8 @@

.thread-list-item__user
+position(absolute, left 0, top 0)
.has-no-author-image &
display: none

.thread-list-item__user-icon
+size(2.75rem)
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/mixins/_long-text-style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

=long-text-style($pc-font-size: 1rem, $mobile-font-size: .8125rem, $background: $base, $font: $default-text)
font-size: $pc-font-size
word-break: break-all
+media-breakpoint-down(sm)
font-size: $mobile-font-size
>*:first-child
Expand Down Expand Up @@ -60,7 +61,6 @@
p
+text-block(1em 1.86)
margin-bottom: 1.5em
word-break: break-all
a
+hover-link-reversal
+default-link
Expand Down
7 changes: 7 additions & 0 deletions app/controllers/api/subscriptions_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class API::SubscriptionsController < API::BaseController
def index
@subscriptions = Subscription.new.all
end
end
8 changes: 8 additions & 0 deletions app/controllers/api/users/recent_reports_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

class API::Users::RecentReportsController < API::BaseController
def index
@user = User.find(params[:user_id])
@reports = @user.reports.limit(10).order(reported_on: :DESC)
end
end
2 changes: 1 addition & 1 deletion app/controllers/companies/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class Companies::UsersController < ApplicationController
TARGETS = %w[student_and_trainee all].freeze
TARGETS = %w[all student_and_trainee graduate adviser mentor].freeze
before_action :require_login

def index
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def set_page

def page_params
keys = %i[title body tag_list practice_id slug]
keys << :user_id if admin_login?
keys << :user_id if admin_or_mentor_login?
params.require(:page).permit(*keys)
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/works_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def work_params
end

def set_my_work
@work = if admin_login?
@work = if admin_or_mentor_login?
Work.find(params[:id])
else
current_user.works.find(params[:id])
Expand Down
4 changes: 1 addition & 3 deletions app/javascript/comments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
.thread-comments-more(v-show='!loadedComment')
.thread-comments-more__inner
.thread-comments-more__action
button#js-shortcut-post-comment.a-button.is-lg.is-text.is-block(
@click='showComments'
)
button.a-button.is-lg.is-text.is-block(@click='showComments')
| コメント({{ commentLimit }})をもっと見る
comment(
v-for='(comment, index) in comments',
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ require('../practice-select.js')
require('../companies.js')
require('../worried-users.js')
require('../report_template.js')
require('../user-recent-reports.js')
require('../subscription-status.js')
2 changes: 1 addition & 1 deletion app/javascript/question-edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.thread-header-metas__start
.thread-header-metas__meta
a.a-user-name(:href='`/users/${question.user.id}`')
| {{ question.user.login_name }}
| {{ question.user.long_name }}
.thread-header-metas__meta
.a-meta
time.thread_header_date-value(
Expand Down
6 changes: 6 additions & 0 deletions app/javascript/reports.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<template lang="pug">
.reports.is-md(v-if='reports === null')
loadingListPlaceholder
.reports(v-else-if='reports.length === 0')
.o-empty-message
.o-empty-message__icon
i.far.fa-sad-tear
.o-empty-message__text
| 日報はまだありません。
.reports(v-else-if='reports.length > 0 || !isUncheckedReportsPage')
nav.pagination(v-if='totalPages > 1')
pager(v-bind='pagerProps')
Expand Down
49 changes: 49 additions & 0 deletions app/javascript/subscription-status.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
document.addEventListener('DOMContentLoaded', () => {
const statusMap = {
trialing: 'is-primary',
active: 'is-success',
canceled: 'is-danger',
past_due: 'is-warning'
}
const statusLabel = {
trialing: 'お試し中',
active: '有効',
canceled: 'キャンセル',
past_due: '期日経過'
}
const selector = '.subscription-status'
const statuses = document.querySelectorAll(selector)
if (statuses) {
let subs = []

fetch('/api/subscriptions.json', {
method: 'GET',
headers: { 'X-Requested-With': 'XMLHttpRequest' },
credentials: 'same-origin',
redirect: 'manual'
})
.then((response) => {
return response.json()
})
.then((json) => {
subs = json.subscriptions

statuses.forEach((status) => {
const subId = status.getAttribute('data-subscription-id')
subs.forEach((sub) => {
if (sub.id === subId) {
const level = statusMap[sub.status]
const label = statusLabel[sub.status]
status.classList.add('a-button')
status.classList.add('is-sm')
status.classList.add(level)
status.innerHTML = label
}
})
})
})
.catch((error) => {
console.warn('Failed to parsing', error)
})
}
})
18 changes: 18 additions & 0 deletions app/javascript/user-recent-reports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Vue from 'vue'
import UserReports from './user-recent-reports.vue'

document.addEventListener('DOMContentLoaded', () => {
const selector = '#js-user-recent-reports'
const reports = document.querySelector(selector)
if (reports) {
const userID = reports.getAttribute('user-id')
new Vue({
render: (h) =>
h(UserReports, {
props: {
userID: userID
}
})
}).$mount(selector)
}
})
62 changes: 62 additions & 0 deletions app/javascript/user-recent-reports.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<template lang="pug">
.thread-list.a-card
.card-header.is-sm
h2.card-header__title
| 直近の日報
.thread-list__items.has-no-author-image
report(
v-for='report in reports',
:key='report.id',
:report='report',
:current-user-id='currentUserId'
)
</template>

<script>
import Report from './report.vue'
export default {
components: {
report: Report
},
props: {
userID: { type: String, required: true }
},
data: function () {
return {
reports: null,
currentUserId: null
}
},
computed: {
reportsAPI() {
return `/api/users/${this.userID}/recent_reports.json`
}
},
created() {
window.onpopstate = () => {
this.getReports()
}
this.getReports()
},
methods: {
getReports() {
fetch(this.reportsAPI, {
method: 'GET',
headers: { 'X-Requested-With': 'XMLHttpRequest' },
credentials: 'same-origin',
redirect: 'manual'
})
.then((response) => {
return response.json()
})
.then((json) => {
this.reports = json.reports
this.currentUserId = json.currentUserId
})
.catch((error) => {
console.warn('Failed to parsing', error)
})
}
}
}
</script>
17 changes: 6 additions & 11 deletions app/javascript/user_mentor_memo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,15 @@ section.a-card.is-memo.is-only-mentor
)
i.fas.fa-pen
| 編集
div(
:class='{ "a-card": productsMode, "thread-comment-form__form": !productsMode }',
v-show='editing'
)
div(
:class='[{ "form-tabs": productsMode, "a-form-tabs": !productsMode }, "js-tabs"]'
)
div(
:class='[{ "is-active": isActive("memo"), "form-tabs__tab": productsMode, "a-form-tabs__tab": !productsMode }, "js-tabs__tab"]',
.a-card__inner(v-show='editing')
.form-tabs.js-tabs
.form-tabs__tab.js-tabs__tab(
:class='{ "is-active": isActive("memo") }',
@click='changeActiveTab("memo")'
)
| メモ
div(
:class='[{ "is-active": isActive("preview"), "form-tabs__tab": productsMode, "a-form-tabs__tab": !productsMode }, "js-tabs__tab"]',
.form-tabs__tab.js-tabs__tab(
:class='{ "is-active": isActive("preview") }',
@click='changeActiveTab("preview")'
)
| プレビュー
Expand Down
3 changes: 0 additions & 3 deletions app/views/admin/companies/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ header.page-header
tr.admin-table__labels
th.admin-table__label = Company.human_attribute_name :name
th.admin-table__label = Company.human_attribute_name :logo
th.admin-table__label = Company.human_attribute_name :description
th.admin-table__label = Company.human_attribute_name :website
th.admin-table__label.actions リンク
th.admin-table__label.actions 操作
Expand All @@ -36,8 +35,6 @@ header.page-header
td.admin-table__item-value.is-text-align-center
- if company.logo.attached?
= image_tag company.logo_url, class: 'admin-table__item-logo-image'
td.admin-table__item-value
= company.description
td.admin-table__item-value
= company.website
td.admin-table__item-value.is-text-align-center
Expand Down
8 changes: 5 additions & 3 deletions app/views/admin/users/_table.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@
td.admin-table__item-value.is-text-align-center
- if user.subscription_id?
= link_to user.subscription_url,
class: 'a-button is-sm is-info',
target: '_blank', rel: 'noopener' do
i.fas.fa-credit-card
class: 'subscription-status',
target: '_blank',
rel: 'noopener',
data: { 'subscription-id': user.subscription_id } do
i.fas.fa-spinner.fa-pulse
- else
| -
td.admin-table__item-value.is-text-align-center
Expand Down
2 changes: 1 addition & 1 deletion app/views/api/reports/_report.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
json.id report.id
json.title truncate(raw(report.title), length: 46)
json.title truncate(report.title, {length: 46, escape: false})
json.reportedOn l(report.reported_on)
json.url report_url(report)
json.editURL edit_report_path(report)
Expand Down
2 changes: 1 addition & 1 deletion app/views/api/reports/recents/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
json.array! @reports do |report|
json.id report.id
json.title truncate(raw(report.title), length: 46)
json.title truncate(report.title, {length: 46, escape: false})
json.reported_on l(report.reported_on)
json.url report_url(report)
json.check report.checks.present?
Expand Down
Loading