Sign inSign up

viiiprock/gic-internal-frontend

By viiiprock

•Updated almost 6 years ago

gic internal frontend

Image
0

744

viiiprock/gic-internal-frontend repository overview

⁠GIC internal

⁠Features

LEGENDS

  • ✅ released
  • 🖌 In progress
  • 🐞 Bug
  • ❌ not yet released
News/ForumsDocumentsCourseHuman Resource
✅ Create category✅ Create category✅ Create course✅ Leave request
✅ Edit category✅ Edit category✅ Update course✅ Leave approve
✅ Delete category✅ Delete category✅ Delete course✅ Import data (temp. not showing)
✅ Create article✅ Create docs✅ Invite course✅ View leave info
✅ Edit article✅ Edit docs✅ Approve course
✅ Delete article✅ Delete docs✅ Notify course
✅ Add tag✅ Attach files✅ Create comment
✅ Create Poll✅ Update comment
✅ Delete Poll✅ View course list
✅ Voting✅ Course schedule
✅ Create comment✅ Attach files
✅ Update comment✅ Comment notify
✅ Delete comment✅ Delete comment
✅ Comment notify
✅ Close topic

MediaUser managementSupportUser & authenticationOthers
✅ Create album✅ Create department✅ Create FAQs✅ Login✅ Free text search
✅ Upload✅ Update department✅ Update FAQs✅ Logout✅ Authentication
✅ Edit album✅ View department✅ Remove FAQs✅ Update user profile✅ Authorization
✅ Delete album✅ Create position✅ View FAQs✅ Send message✅ User group
✅ View album✅ User list filter✅ Create help✅ Reply message✅ Setting role
✅ View help✅ Notify message
✅ Help notify✅ Delete message
✅ Activities log
✅ Create user
✅ Change password
✅ Remove user
✅ Import user
✅ Reset password

⁠Deployment

TODO: redo with passing environment https://github.com/facebook/create-react-app/issues/982⁠

  1. Pull docker image at Docker hub repository⁠
# check latest build
docker images | grep viiiprock/gic-internal-frontend
# pull latest
docker pull viiiprock/gic-internal-frontend:latest

a. If Use nginx-proxy

docker run -e VIRTUAL_HOST=one.gic.vn \
-e NODE_ENV=production \
-d --name gic-internal viiiprock/gic-internal-frontend

b. If use docker compose Regist to server. Add a docker-compose.yml file to /docker/frontend/ directory

version: "3"
services:
  gic-frontend:
    image: viiiprock/gic-internal-frontend:latest
    container_name: gic-frontend
    restart: always
    environment:
      - NODE_ENV=production
      - VIRTUAL_HOST=one.gic.vn
    ports:
      - "88:3000"
    command: ["sh", "-c", "yarn run start:prod"]
  1. Up and run

At /docker/frontend/ directory, run command after image is pulled

sudo docker-compose up -d
  1. Config
  • Remote to containter: docker exec -it <container_id> /bin/sh
  • Install nano: apk add nano
  • Nano and edit file location: /src/constants.js Edit the APIs endpoint

API_URI - for main graph api UPLOAD_URI - for upload api

  • Exit and restart container
  1. Update container:
  • Pull latest image docker pull viiiprock/gic-internal-frontend:latest
  • Run docker compose sudo docker-compose up -d gic-frontend
  • Repeat step 5

⁠dev note

Dev server deploy


docker run -e VIRTUAL_HOST=gic.doda100.com \
-d --name gic-internal --rm viiiprock/gic-internal-frontend:release

⁠Forums

Có 2 section: news, forums. Mỗi section có nhiều forum khác nhau.

Khi tạo 1 forum, gán vào section nào thì sẽ được hiển thị danh sách news section hoặc danh mục diễn đàn.

⁠Thread (article)

Danh sách được truy vấn theo section (news, forums)

⁠Poll

Poll được cập nhật theo article: khi create/update thread có kèm theo poll, thì poll đó được gán theo thread đó.

Object example

{
    id: 1,
    question: "What is Wallaby, tammar?",
    options: [
      {
        id: 1,
        name: "Shiziling",
        voteUsers: [1, 4, 8, 9]
      },
      {
        id: 2,
        name: "Tolkmicko",
        voteUsers: [] // Lưu ý chỗ này, nếu chưa có user vote thì data trả về là một array rỗng
      },
      {
        id: 3,
        name: "Intendente Alvear",
        voteUsers: [8, 1, 6]
      },
      {
        id: 4,
        name: "Buenaventura",
        voteUsers: [5, 7, 3, 9, 10, 11]
      }
    ],
    threadID: 10,
    closed: true
  }
⁠Course

Invite Train HR => choose list of dept. => manager (role) get info => approve: default selected all user => remove

No stack queue data (class)

⁠Ý tưởng đề xuất (version tiếp theo)
⁠HR

Dữ liệu ngày phép sẽ được nhập (import) vào một lần đầu tiên duy nhất, sau đó sẽ hoạt động theo 2 cases như sau:

  1. Tùy theo quy định công ty, ngày phép sẽ được cộng vào theo từng tháng hoặc cấp sẵn theo hợp đồng.
  2. Sau khâu xác nhận nghỉ phép trong quy trình xin nghỉ, thì ngày phép sẽ được tự động trừ vào trong hệ thống.

Với quy trình như vậy, thì sẽ có 2 trường hợp bất thường xảy ra:

  1. Nghỉ ko phép => import ngày đã nghỉ (tính luôn .5 ngày) trong tháng. => so sánh nếu ngày nghỉ đó chưa xin phép trên hệ thống => a) tự động add vào unpaid || b) request submit trong thời gian x ngày => nếu ko submit => a)

  2. Đã xin nghỉ nhưng vẫn đi làm => User submit xin hủy đơn xin nghỉ (thêm 1 trường xin hủy trong db) => HR approve => notify

Tag summary

Content type

Image

Digest

Size

241.8 MB

Last updated

almost 6 years ago

docker pull viiiprock/gic-internal-frontend