GithubHelp home page GithubHelp logo

aliogutcen / react.js-managerpanel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from humanresourcesteam/react.js-managerpanel

0.0 0.0 0.0 849 KB

Designing the Manager Panel of our HRM Project with React.js

JavaScript 77.15% HTML 0.82% Dockerfile 0.09% SCSS 21.94%

react.js-managerpanel's Introduction

Human Resources Management Manager Panel

In our HRM project, we have a manager panel that allows the manager to add and list employees, view, approve or reject employees' expense, leave, and advance requests, as well as edit their own profile.

Screenshot_8

Features

  • Inbox
  • Mail service
  • Notification
  • Worker Add Pages Update
  • Worker validation change

Installation

Install project with npm

  git clone https://github.com/humanresourcesteam/react.js-managerpanel.git
  cd my-project
  npm install

Run Locally

Clone the project

  git clone https://github.com/humanresourcesteam/react.js-managerpanel.git

Go to the project directory

  cd my-project

Install dependencies

  npm install

Start the server

  npm run start

Run Docker

Clone the project

  docker push aliogutcen/my-react-manager:20

Running on Docker

  docker build -t <my-react-manager> .
  docker run -p 3000:3000 <my-react-manager>

Usage/Examples

import "./datatable.scss";
import { managerColumns, managerRows } from "../../datatablesoruce";
import { DataGrid, GridColumnHeaderFilterIconButton } from "@mui/x-data-grid";
import { useState, useEffect } from "react";
import ManagerService from "../../service/ManagerService";
import WorkerService from "../../service/WorkerService";
import Cookies from "js-cookie";
import { Link } from "react-router-dom";
import withAuth from "../../withAuth";

const Datatable = () => {
  const [id, setId] = useState("");
  const [managerid, setManagerid] = useState("");
  const [companyid, setCompanyid] = useState("");
  const token = Cookies.get("token");
  const [worker, setWorker] = useState([]);

  useEffect(() => {
    ManagerService.getInfoForAdmin(token).then((response) => {
      setCompanyid(response.data.companyid);
      setManagerid(response.data.id);
    });
  }, []);

  useEffect(() => {
    if (companyid) {
      WorkerService.getAllWorker(companyid).then((response) => {
        console.log(response);
        setWorker(response.data);
      });
    }
  }, [companyid]);

  const actionColumn = [
    {
      field: "action",
      headerName: "Action",
      width: 200,
      renderCell: (params) => {
        return (
          <div className="cellAction">
            <div className="view">
              <Link
                className="links"
                to={"/employee/" + params.row.id}
                style={{ textDecoration: "none" }}
              >
                <span>View Profile</span>
              </Link>
            </div>
          </div>
        );
      },
    },
  ];

  return (
    <div className="datatable">
      <div className="dataTableTitle">
        <Link to="/employee/add" className="link">
          Add new employee
        </Link>
      </div>
      <DataGrid
        style={{ fontWeight: "600" }}
        className="datagrid"
        rows={worker}
        columns={managerColumns.concat(actionColumn)}
        rowHeight={100}
        initialState={{
          pagination: {
            paginationModel: {
              pageSize: 7,
            },
          },
        }}
        pageSizeOptions={[5]}
      />
    </div>
  );
};

export default Datatable;

Screenshot

Screenshot_7

Screenshot_1

Screenshot_2

Screenshot_3

Screenshot_4

Screenshot_5

Screenshot_6

Screenshot_9

Screenshot_10

Screenshot_11

Screenshot_12

Screenshot_13

Screenshot_14

react.js-managerpanel's People

Contributors

aliogutcen avatar ozturkmelihcan avatar

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.