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

設計講者素材上傳頁面 #53

Closed
hashman opened this issue May 17, 2019 · 16 comments
Closed

設計講者素材上傳頁面 #53

hashman opened this issue May 17, 2019 · 16 comments
Assignees
Milestone

Comments

@hashman
Copy link
Collaborator

hashman commented May 17, 2019

Ref Issue: MOPCON/MOPCON#142

參考文件:https://docs.google.com/document/d/1vdx2N52TuFyNiZZ64fLH9C353QX5VBVWOEb5_FbT-Ug/edit

參考上方文件,設計給講者上傳素材之前端介面

@hashman
Copy link
Collaborator Author

hashman commented Jun 2, 2019

這部分 @hsimao 已經將頁面設計完成了,就麻煩 @xwang0929 入場幫忙處理後端的部分了,謝謝,等 API 出來再請 Mars 來做前後串接,謝謝 <(_ _)>

@hashman hashman modified the milestones: Sprint 3, Sprint 4 Jun 17, 2019
@xwang0929
Copy link
Collaborator

model 先送 pr,實作說明如下:

外部表單使用獨立的 template ,使用純 html form 或其他 js framework 都行。路徑:

  • GET /speaker/{ACCESS_KEY}
    顯示輸入表單,需要另外加上密碼欄位,密碼正確才能寫入資料庫
  • POST /speaker/{ACCESS_KEY}
    寫入資料庫

內部使用路徑:

  • 前端使用原本的 vuejs
  • 後端加上 /api/speaker

@xwang0929
Copy link
Collaborator

分享一下使用 postman 測試 laravel api 時遇到的狀況:

在 PUT form-data 到 api 時,要改成用 POST 然後多加個欄位: _method=PUT 。通常是要同時上傳檔案時才會遇到,如果不需要上傳檔案的話,body 直接使用 x-www-urlencoded 就行。

@hashman
Copy link
Collaborator Author

hashman commented Jul 1, 2019

大家都已經在這個 issue 裡面 comment 了,我就不特別調整 issue 了, Sprint 5 主要以前台為主,如果有心力處理後端當然是最好的,也麻煩大家幫忙了 <(_ _)>

@hashman
Copy link
Collaborator Author

hashman commented Jul 4, 2019

@xwang0929 這邊是不是剩下 @Tzuhui 串後台?

另外是前台的部分應該還沒完成對吧?

@xwang0929
Copy link
Collaborator

xwang0929 commented Jul 4, 2019

@xwang0929 這邊是不是剩下 @Tzuhui 串後台?

另外是前台的部分應該還沒完成對吧?

@hashman
是的,上次開會是說請 @Tzuhui 串後台,@hsimao 串前台。

@hashman
Copy link
Collaborator Author

hashman commented Jul 9, 2019

@xwang0929 這邊是不是剩下 @Tzuhui 串後台?
另外是前台的部分應該還沒完成對吧?

@hashman
是的,上次開會是說請 @Tzuhui 串後台,@hsimao 串前台。

ok @hsimao 那邊的進度還好嗎?

@ghost
Copy link

ghost commented Jul 10, 2019

@xwang0929 這邊是不是剩下 @Tzuhui 串後台?
另外是前台的部分應該還沒完成對吧?

@hashman
是的,上次開會是說請 @Tzuhui 串後台,@hsimao 串前台。

ok @hsimao 那邊的進度還好嗎?

剛要開始處理,目前有遇到問題,我 fetch 最新的 develop 下來後有遇到幾個問題

1.) 參考此篇說明 使用以下網址會報錯
http://127.0.0.1:8000/speaker/form/070907d5-9b45-4545-9273-93200ecda738
螢幕快照 2019-07-10 下午8 04 54

2.) 看起來好像是資料庫要注入,我使用 php artisan db:seed --class SepakersTableSeeder 指令注入後還是不行~也有報錯
或是我方法有錯~請在指導一下QQ
螢幕快照 2019-07-10 下午8 07 08

3.) 講者前台表單的 html 檔案擺放位置放哪裡~才能被此路由吃到?

對以上幾個問題~請
@xwang0929 @hashman 幫忙指導我一下~謝謝

@xwang0929
Copy link
Collaborator

@hsimao

這個指令讓你補新的資料庫處理程序
php artisan migrate --seed

還是有問題的時候再輸入這個指令重新整理資料庫
php artisan migrate:refresh --seed

1 & 2 都是資料庫的問題,重跑 migration 應該就行了。

3.) template 在 /resources/views/form/speaker.blade.php 。裡面只有簡單的 html,需要幫忙隨時跟我說。

@hashman
Copy link
Collaborator Author

hashman commented Jul 11, 2019

@Tzuhui#78 MR 我 merge 了,這邊寫一下還有兩個東西需要補一下

  1. 點擊「詳細」是 call /api/speaker/{$id} 這個 api 不用打到列表的 api ,目前這樣可以 work 沒問題,但是實務上面會打 show 的 api
  2. 目前講者 / 贊助商後台設定頁面還沒加上按鈕,這部份幫我補上,以下為按鈕階層設計
  • 贊助商 / 講者管理 (Sponsor / Speaker Management)
    • 贊助商管理 (Sponsor Management)
    • 講者管理 (Speaker Management)

以上再麻煩妳幫忙囉~~謝謝

@ghost
Copy link

ghost commented Jul 11, 2019

@hsimao

這個指令讓你補新的資料庫處理程序
php artisan migrate --seed

還是有問題的時候再輸入這個指令重新整理資料庫
php artisan migrate:refresh --seed

1 & 2 都是資料庫的問題,重跑 migration 應該就行了。

3.) template 在 /resources/views/form/speaker.blade.php 。裡面只有簡單的 html,需要幫忙隨時跟我說。

資料庫有成功注入了,但還是對應不了畫面,使用範例網址會直接返回
404 Not Found
螢幕快照 2019-07-11 下午10 47 33

我改用網址不加參數好像也吃不到目前的speaker.blade.php 檔案
http://127.0.0.1:8000/speaker/form/
螢幕快照 2019-07-11 下午10 54 50

我自己在 /resources/views/form/speaker.blade.php 底下新建一個 index.html 也無法吃到
這裡的規則要如何建置檔案後並可以看到~?我看 laravel 官網看到霧煞煞😢 ~求助 @xwang0929 @hashman

@FWcloud916
Copy link
Collaborator

@hsimao
你可以先登入 ems 以後進
http://127.0.0.1:8000/api/speaker/
應該可以直接看到講者的資料,可以隨意挑一個

{
    id: 61,
    name: "酆思",
    name_e: "Trevion Howell MD",
    company: "相信酒店",
    ........
    access_key: "22d033b6-506d-476c-ba8f-6f963a84fca9",
    access_secret: "M82ZMPYTr9KDPDS9GwTP",
    .................
    speaker_type_text: "CFR",
    external_link: "http://192.168.1.32:8000/speaker/form/22d033b6-506d-476c-ba8f-6f963a84fca9"
}

然後 external_link 就會是有效的連結

@xwang0929
Copy link
Collaborator

@hsimao ,不好意思,github 的信不會馬上看,現在才看到你的訊息。

就像 @FWcloud916 說的那樣,可以直接在 api 找到正確的網址。你也可以直接改 speaker.blade.php,把它當 html 改就行了,目前裡面只有放一個表單讓你輸入密碼而已。

需要即時回應的話用 slack 找我比較快。

@hashman hashman unassigned ghost Jul 14, 2019
@hashman
Copy link
Collaborator Author

hashman commented Jul 14, 2019

這個改由 @Tzuhui 幫忙接手

@hashman hashman modified the milestones: Sprint 5, Sprint 6 Jul 14, 2019
@hashman
Copy link
Collaborator Author

hashman commented Jul 18, 2019

今天測試的時候遇到幾個問題提一下

  1. 後台建立講者完畢的時候連結應該要是完整連結不是只有 access_key (但這個看上面的討論應該是還沒接完)
  2. 講師上傳前台應該還沒完成

@Tzuhui 幫忙一下,謝謝

@Tzuhui
Copy link
Collaborator

Tzuhui commented Jul 18, 2019

@hashman

  1. 剛剛有確認一下,講者建立完畢的連結沒有修改到~ 會再修改後推上來
  2. 講者前台還在努力(進度大約是做完一半),這週會完成

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants