Giter VIP home page Giter VIP logo

uniquerecruitmentsystem's People

Contributors

colinaaa avatar danmosama avatar dependabot[bot] avatar hash-roar avatar maniaciachao avatar mtunique avatar nothatdinger avatar ttzztztz avatar wangnengjie avatar winderica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uniquerecruitmentsystem's Issues

Error response became the content of resume

现象(/cc @siger-young ):
961BCCE01ECA38316B16A01D119B540D

原因:
https://github.com/UniqueStudio/UniqueRecruitmentBackend/blob/eb47240814c9390bbf15817ade24fc281309f492/src/actions/candidate/getResume.ts#L6-L20
这段代码看起来没问题,实际上外面这层try-catch没法catch到15行的error,因为express的API设计一贯遵守回调为主的传统风格,res.download的第三个参数正是onError

实际上这里省略了也没什么关系,因为我们还有全局的Error handler,只可惜这个handler没给响应设置状态码,因此下载一个不存在的文件时,前端拿到了200,认为报错的响应就是文件的内容,进而拿到了上图所示的resume.txt
https://github.com/UniqueStudio/UniqueRecruitmentBackend/blob/eb47240814c9390bbf15817ade24fc281309f492/src/middlewares/errorHandler.ts#L4-L9

但是第一个代码片段的第9行有判断!data || !data.resume,如下代码保证了resume字段一定指向简历文件,为什么还会出现文件不存在的情况呢?
https://github.com/UniqueStudio/UniqueRecruitmentBackend/blob/eb47240814c9390bbf15817ade24fc281309f492/src/actions/candidate/addCandidate.ts#L23-L43

(接下来是个人猜测)我们有个定时清理任务,这位同学很不幸地在整点提交简历,又很不幸地遇到了unlinkcopyFile间的时间窗口,导致简历还没复制就被删掉了
https://github.com/UniqueStudio/UniqueRecruitmentBackend/blob/eb47240814c9390bbf15817ade24fc281309f492/src/task.ts#L11-L23

检讨:

  • 当初我为什么不直接移动文件,而是选择复制加定期删除呢🤔

点击候选人详细信息中的评论 Chip 时出现栈溢出

点击被码掉的 Chip 时,控制台出现栈溢出的报错
image

image

出错位置的代码与焦点相关

image

猜测与 mui/material-ui#10341 是同一个问题,即

I got this error when using a Popover inside my Dialog with focus on an Input, i found this issue by google and solved it by adding disableEnforceFocus when the input was focused and the Popover is visible, I think this issue is enough 👍

如果猜想正确,在 https://github.com/UniqueStudio/UniqueRecruitmentDashboard/blob/cdda9ff924865375d1ca0dc185b81603d78ae748/src/views/Candidates.tsx#L73 加上 disableEnforceFocus 即可以解决

Enhancements in next version

  • 状态管理 首要解决的问题
    • 目前版本中store的结构仍比较混乱,且在storage - state - data from server的过程中会产生一些bug
  • 改进聊天室
    • @ 功能: 优先级不高,且还要引入通知系统,先放一放。
    • 组面:考虑google docs式的右侧边栏,这样还可以容纳一些东西
  • 权限管理
    • 需要限制访问自己所处的那次招新、跨组删除、发送短信等
    • 既然企业微信这块已经没问题了,那么就只需要后端适配就可以了
    • 由于之前用户可能没有填正确信息,且基本信息大概可以全部从企业微信获取了,考虑清一波users表
    • 多组选手? 暂时搁置
  • 考虑快通选手
    • 这一块加一个字段就好了,主要是要招新表单增加这一项
  • 改进面试分配界面
    • 支持对单个选手的时间分配、发送短信操作
    • 有时间的话还会做一个更人性化的界面
  • 为移动端增加登录方法
    • 这个也不是问题,id用微信提供的id,密码用户自己设置就好了
  • 操作日志
    • 暂不考虑,有权限之后没多大意义
  • 支持查看过往招新选手信息
    • 目前版本只能查看进行中的招新,但是已留有相应余地
  • 多栏布局 -> 两栏布局?
    • 一般来说拖拽操作不会跨多个流程
    • 这样可以统合目前的报名审核群面审核部分
    • 考虑 招新 -> 组别 -> 流程 的展示方式
    • 暂不考虑,最多会在选组别之前选招新
  • 文档、注释
    • 不太急,等一个接锅人
  • 修改招新信息
    • 笔试、面试时间在这里设置也会更加合理一些
  • 优化性能
    • 切换组别的时候会卡顿
    • 首次加载较慢,gzip,入口组件单独加载
    • h2,然而有时候好像不起作用
  • 增强后端
    • 单元测试
    • 安全性
    • 不需要隐藏报名选手简历的路径,#2 第一点
  • 下载文件
    • 进度条(用RxJS不太好做,鸽了
    • 考虑换一台服务器

如果您有建设性的建议、意见,欢迎回复。

Cookie support

HR system requires scan QR code every time.
Maybe you could store credentials in Cookie avoiding frequent artificial login action.

Bug: Access mis-deny

2021.9才进行企业微信登录的同学无法查看招新信息,即使加入时间是2020年秋招。

hr选择面试时间

背景

目前的hr时间选择取决于组长

议题

  1. 如果hr时间是由每位参与招新的组员进行选择,即选择自己可以到场的空闲时间,那么每个人的面试任务都可以分配到人
  2. 选择面试时间在不同的硬件时间下的显示不同,尝试适配一下

Resume downloading error

现象:来自安卓组(已复现)

QQ20201001-0

与 UniqueStudio/UniqueRecruitmentBackend#20 不同,这位选手的简历是确实存在的,mongo中为

{
    "resume" : "../resumes/2020A/android/xxx - abcd.docx"
}

后台所有地方都看起来正常,看起来可能是下载按钮的问题

Something needs to be improved

  • Dark mode, menu icon disappeared
    image

  • Press enter to login in the password input box

  • Improve data transfer. Pulling all data of one term from server may cause too many seconds waiting when the number of candidates is very high. Use cache and fetch data in the background or fetch less data from server per time.

数据格式更新备忘

  1. candidate
    • sex改成gender,0-2,分别为其他、男、女
    • grade(年级),0-6,分别为大一到研三
    • score改成rank,0-4,分别为无、10%、...
    • 新增referrer,推荐人
    • 考虑改一下time1、slot1等的叫法🤔
    • comments从对象变成数组
  2. comment
    • 新增uid、username
    • comment改为content
    • evaluation,0-2,分别为差到好
  3. user
    • sex改成gender,0-2,分别为其他、男、女
  4. recruitment
    • begin、end由number改成string
    • 考虑改一下time1、slot1等的叫法🤔
  5. message
    • time由number改成string
export type Group = 'web' | 'lab' | 'ai' | 'game' | 'android' | 'ios' | 'design' | 'pm';

export interface Candidate {
    name: string;
    gender: 0 | 1 | 2; // TODO: 1: Male, 2: Female, 0: Other, sex -> gender
    grade: 0 | 1 | 2 | 3 | 4 | 5 | 6; // TODO
    institute: string;
    major: string;
    rank: 0 | 1 | 2 | 3 | 4; // TODO: 1: 10%, 2: 25%, 3: 50%, 4: 100%, 0: null, score -> rank
    mail: string;
    phone: string;
    group: Group;
    title: string; // e.g. 2018A || 2018S (A: AUTUMN, S: SPRING, C: CAMP)
    intro: string;
    isQuick: boolean;
    referrer?: string; // TODO: new
    resume?: string; // file path
    abandon?: boolean;
    rejected?: boolean;
    time1?: object[]; // TODO: use better words to distinguish time and slot
    slot1?: string[];
    time2?: object[];
    slot2?: string[];
    step?: 0 | 1 | 2 | 3 | 4 | 5;
    comments?: Comment[]; // TODO: object -> array
}

export interface Comment {
    uid: string; // TODO: new
    username: string; // TODO: new
    content: string; // TODO: comment -> content
    evaluation: 2 | 1 | 0; // TODO: 2: good, 1: so-so, 0: bad
}

export interface User {
    weChatID: string;
    username: string;
    joinTime: string; // e.g. 2018A || 2018S (A: AUTUMN, S: SPRING, C: CAMP)
    isCaptain: boolean;
    isAdmin: boolean;
    phone: string;
    mail: string;
    gender: 0 | 1 | 2; // TODO: 1: Male, 2: Female, 0: Other, sex -> gender
    group: Group;
    avatar?: string;
}

export interface Data {
    group: Group;
    total: number;
    steps: number[];
}

export interface Time {
    date: string;
    morning: boolean;
    afternoon: boolean;
    evening: boolean;
}

export interface Recruitment {
    title: string; // e.g. 2018A || 2018S (A: AUTUMN, S: SPRING, C: CAMP)
    begin: string; // TODO: timestamp should be string
    end: string; // TODO: timestamp should be string
    total: number;
    time1: {
        [group in Group]: Time[];
    };
    time2: Time[];
    slot1?: {
        [group in Group]: number[]
    };
    slot2?: number[];
    data: Data[];
}

export interface Message {
    isSelf: boolean;
    name: string;
    time: string; // TODO: timestamp should be string
    type: string;
    avatar: string;
    message: string;
}

邮件推送

集成邮件推送的功能到hr面板(OpenPlatformApi)

Other login method?

The Wechat login method is just ANNOYING. It's nice to have a username-password login method which can be simply recorded by browser.

[Question] Status of development

现在已经写完了吗?如果没写完要不迁移API你们来做,我写下文档就行

还有就是,不是说这个让19级来写吗?

添加分享候选人链接功能

背景

可以通过链接来分享一个候选人,其他人打开后直接打开该候选人的信息

实现方式

  • 主要由前端实现
  • 需要考虑到打开者未登录,做redirect的情况
  • 可以考虑将分享作为一个较为通用的能力

titleConverter error from full to abbr

I'm writing @uniqs/utils package to manage all of ours utils. Then I found that the implementation of titleConverter seems to have a bug.

image

We should have abbr[j] here to get correct abbr:

https://github.com/UniqueStudio/UniqueRecruitmentDashboard/blob/2ba31c8cd709665c5926a27a1e89d60b00157b98/src/utils/titleConverter.ts#L10-L13

-return title.slice(0, 4) + abbr[i];
+return title.slice(0, 4) + abbr[j];

seems that the titleConverter at backend also has the same problem :)

Suggestion: Overdesign

candidate dashboard 选择时间的UI设计令人迷惑,不少选手都来问过这个应该怎么操作,希望能设计得更直观一点

Feature: Default Group selection

We can have one url like this https://join.hustunique.com/web, and the form will change the default selection value of Group . (He can still change his target group in this page)

Number of slots can be minus when setting interview schedule

下面的代码保证了显示时人数总是大于等于0
https://github.com/UniqueStudio/UniqueRecruitmentDashboard/blob/1f18311072c87c3d9082fc92d9b088a4dba0a194/src/components/Allocation/index.tsx#L104-L113
这个时候向下调整3月19日上午的人数,界面上不会发生任何的变化
image
但是下面的函数仍然被调用,把3月19日上午的人数设置为了-1
https://github.com/UniqueStudio/UniqueRecruitmentDashboard/blob/1f18311072c87c3d9082fc92d9b088a4dba0a194/src/components/Allocation/index.tsx#L65-L75
而且目前的后端没有校验(正在写的是有的)
image

style missing due to dark mode

most of the styles are created by useStyles({ ... }) like:

https://github.com/UniqueStudio/UniqueRecruitmentDashboard/blob/31bc9c7f66b42f87bd904d1d39666d4f9315d562/src/components/Card/index.tsx#L46

and small fragments of components are wrapped with useMemo like:

https://github.com/UniqueStudio/UniqueRecruitmentDashboard/blob/31bc9c7f66b42f87bd904d1d39666d4f9315d562/src/components/Card/index.tsx#L91-L101

that's fine when fragments are so simple which will never change.

but now, the styles of these fragments will change when switching between light mode and dark mode,
which leads to missing styles.

will add class names to deps of useMemo as a fix.

any problems related to styles can be list below, I will try to fix them someday.

About comment user-select

comment的时候,如果我想要修改我的comment,在上面加新的评论,只能全部重新输入,而且不能复制粘贴我之前的评论,希望可以加一个user-select,我想复制我之前的评论,不想重新再打一遍

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.