goodjoblife / GoodJobShare

GoodJob 職場透明化運動
https://www.goodjob.life/
MIT License
82 stars 11 forks source link

[公司頁面] 薪資工時分頁 #1400

Closed peteranny closed 2 weeks ago

peteranny commented 3 weeks ago

1385

這個 PR 是?

讓公司/職稱頁面的薪資標籤頁做分頁,包含搜尋

技術細節

原本公司頁面的資料都放在 state.company.[name].status|data|error,資料包含薪資、面試、經驗。

由於薪資會獨立獲取,現將薪資移至 state.companyIndex.timeAndSalaryByName.[name].status|data|error

Before After
截圖 2024-08-24 下午1 19 09 截圖 2024-08-24 下午1 16 56

TODO

目前只有抽換 API,造成搜尋時會整頁重新載入。 正常的使用體驗應該是只有下方表格重新載入。

由於這個 PR 已經太大,會另外開 PR 修正這個問題。 這個 PR 只專注在抽換 pagination API。

有哪些 dependency?

https://github.com/goodjoblife/WorkTimeSurvey-backend/pull/1043

Screenshots

公司薪資

https://github.com/user-attachments/assets/88d1d264-c127-41e5-9142-7de4c852fa1f

職稱薪資

https://github.com/user-attachments/assets/ad2c60fc-e778-4ca0-9cb2-ddfe68937827

我應該如何手動測試?

peteranny commented 3 weeks ago

Just fixed some issues and should be okay now

barry800414 commented 3 weeks ago

另一個可以優化的地方是,只有第一次需要載入薪資相關的統計,切換不同頁數時不用重新載入。但同意這個 PR 已經不小,可以另外發 PR -> 另外開一張 enhancement 的票:https://github.com/goodjoblife/GoodJobShare/issues/1416

barry800414 commented 3 weeks ago

https://github.com/user-attachments/assets/933ab406-caca-42e0-b321-7929dd649532

另外 debounce time 可能要調長一點

barry800414 commented 3 weeks ago

LGTM 沒想到需要的改動這麼大,感謝你

mark86092 commented 2 weeks ago

只有第一次需要載入薪資相關的統計

@barry800414 要不要開個 issue,超出分頁的 issue scope

barry800414 commented 2 weeks ago

只有第一次需要載入薪資相關的統計

@barry800414 要不要開個 issue,超出分頁的 issue scope

另外開一張 enhancement 的票:https://github.com/goodjoblife/GoodJobShare/issues/1416

mark86092 commented 2 weeks ago

這個 PR 我也 cherry-pick 到 master branch,stage 站可以測試,看起來沒有跟 dev 相衝突