-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6441 from fjordllc/main
Release 2023-05-04 08:08:45
- Loading branch information
Showing
74 changed files
with
828 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/controllers/scheduler/daily/send_message_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
class Scheduler::Daily::SendMessageController < SchedulerController | ||
def show | ||
User.mark_message_as_sent_for_hibernated_student | ||
sent_student_followup_message | ||
head :ok | ||
end | ||
|
||
private | ||
|
||
def sent_student_followup_message | ||
User.students.find_each do |student| | ||
next unless student.followup_message_target? | ||
|
||
User.create_followup_comment(student) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<template lang="pug"> | ||
.card-list.a-card | ||
.card-header.is-sm | ||
h2.card-header__title | ||
| 提出物 | ||
.card-list__items(v-if='products && products.length > 0') | ||
product( | ||
v-for='product in products', | ||
:key='product.id', | ||
:product='product', | ||
:current-user-id='currentUserId', | ||
:is-mentor='isMentor') | ||
.card-body(v-else) | ||
.card__description | ||
.o-empty-message | ||
.o-empty-message__icon | ||
i.fa-regular.fa-sad-tear | ||
.o-empty-message__text | ||
| 提出物はまだありません。 | ||
</template> | ||
<script> | ||
import Product from '../product.vue' | ||
export default { | ||
name: 'UserProducts', | ||
components: { | ||
product: Product | ||
}, | ||
props: { | ||
userId: { type: Number, default: null }, | ||
isMentor: { type: Boolean, required: true }, | ||
currentUserId: { type: String, required: true } | ||
}, | ||
data() { | ||
return { | ||
products: null | ||
} | ||
}, | ||
computed: { | ||
newParams() { | ||
const params = new URL(location.href).searchParams | ||
if (this.userId) { | ||
params.set('user_id', this.userId) | ||
} | ||
return params | ||
}, | ||
productsAPI() { | ||
const params = this.newParams | ||
return `/api/products.json?${params}` | ||
} | ||
}, | ||
created() { | ||
this.getProducts() | ||
}, | ||
methods: { | ||
async getProducts() { | ||
const response = await fetch(this.productsAPI, { | ||
method: 'GET', | ||
headers: { 'X-Requested-With': 'XMLHttpRequest' }, | ||
credentials: 'same-origin', | ||
redirect: 'manual' | ||
}).catch((error) => console.warn(error)) | ||
const json = await response.json().catch((error) => console.warn(error)) | ||
this.products = json.products | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<template lang="pug"> | ||
.col-xxl-3.col-xl-4.col-lg-4.col-md-6.col-xs-12 | ||
.users-item | ||
.users-item__inner.a-card | ||
.users-item__header | ||
.users-item__header-inner | ||
.users-item__header-start | ||
.users-item__icon | ||
.users-item__user-icon-image.a-user-icon.a-placeholder | ||
.users-item__header-end | ||
.card-list-item__rows | ||
.card-list-item__row | ||
.card-list-item-title.a-placeholder | ||
.card-list-item__row | ||
.card-list-item-meta | ||
.card-list-item-meta__items | ||
.card-list-item-meta__item.a-placeholder | ||
.card-list-item-meta__item.a-placeholder | ||
.sns-links | ||
.sns-links__items.is-button-group.a-placeholder | ||
.users-item__body | ||
.users-item__description.a-short-text.a-placeholder | ||
.users-item__tags | ||
.tag-links | ||
.tag-links__items | ||
.tag-links__item.a-placeholder | ||
.tag-links__item.a-placeholder | ||
.completed-practices-progress | ||
.completed-practices-progress__bar-container | ||
.completed-practices-progress__bar.a-placeholder | ||
.completed-practices-progress__number.a-placeholder | ||
.card-footer | ||
.card-main-actions | ||
.card-main-actions__items | ||
.card-main-actions__item | ||
.following | ||
.following__summary | ||
.a-button.is-secondary.is-sm.is-block.a-placeholder | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.