Skip to content

Commit

Permalink
feat(examples): add refine-hr-community (#6358)
Browse files Browse the repository at this point in the history
Co-authored-by: Ali Emir Şen <[email protected]>
Co-authored-by: Necati Özmen <[email protected]>
  • Loading branch information
3 people authored Oct 7, 2024
1 parent a3fca84 commit 6c2931a
Show file tree
Hide file tree
Showing 75 changed files with 6,275 additions and 145 deletions.
22 changes: 22 additions & 0 deletions examples/refine-hr-ce/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
83 changes: 83 additions & 0 deletions examples/refine-hr-ce/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<div align="center" style="margin: 30px;">
<a href="https://refine.dev/">
<img alt="refine logo" src="https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/refine-hr-do/readme.png">
</a>

</br>
</br>

<div align="center">
<a href="https://refine.dev">Home Page</a> |
<a href="https://discord.gg/refine">Discord</a> |
<a href="https://refine.dev/examples/">Examples</a> |
<a href="https://refine.dev/blog/">Blog</a> |
<a href="https://refine.dev/docs/">Documentation</a>
</div>
</div>

</br>
</br>

<div align="center">Build your React-based internal tools, admin panels, dashboards, B2B apps with flexibility in mind.
An open-source, headless React meta-framework, developed with a commitment to best practices, flexibility, minimal tech debt, and team alignment, could be a perfect fit for dynamic environments.

<br />
<br />

[![Discord](https://img.shields.io/discord/837692625737613362.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/refine)
[![Twitter Follow](https://img.shields.io/twitter/follow/refine_dev?style=social)](https://twitter.com/refine_dev)

</div>

## About

Demonstrating Refine's Capabilities for Building Enterprise-Level HR Tools

HR Management App Example built using [Refine](https://refine.dev/), [Material UI](https://mui.com/material-ui/) and Deploying to [Digital Ocean Platform](https://www.digitalocean.com/)

**You can view the live demo of the application [here](https://refine-hr-community-4nihf.ondigitalocean.app).**

## Features

- **Login page**: Allows users to log in as either a manager or an employee. Managers have access to the `Time Off` and `Requests` pages, while employees only have access to the `Time Off` page.

- **Time Off pages**: Allows employees to request, view, and cancel their time off. Also managers can assign new time offs.

- **Requests page**: Accessible only to HR managers for approving or rejecting time off requests.

- **Access Control**: Different roles have different access levels to the application.

## Try this example on your local

```bash
npm create refine-app@latest -- --example refine-hr-ce
```

## Try this example on CodeSandbox

[![Open refine-hr-ce example from refine](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/embed/github/refinedev/refine/tree/master/examples/refine-hr-ce?view=preview&theme=dark&codemirror=1)

## Screenshots

![Login Page](https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/refine-hr-do/login.png)

<br />

![Login Page](https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/refine-hr-do/manager-dashboard.png)

<br />

![Login Page](https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/refine-hr-do/employee-request.png)

<br />

![Login Page](https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/refine-hr-do/manager-approve.png)

<br />

![Login Page](https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/refine-hr-do/manager.png)
<br />

![Login Page](https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/refine-hr-do/request-edit.png)

<br />
37 changes: 37 additions & 0 deletions examples/refine-hr-ce/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using refine" />
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"
/>

<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>Refine HR</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
57 changes: 57 additions & 0 deletions examples/refine-hr-ce/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "refine-hr-ce",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsc && refine build",
"dev": "refine dev",
"refine": "refine",
"start": "refine start"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"dependencies": {
"@emotion/react": "^11.8.2",
"@emotion/styled": "^11.8.1",
"@mui/lab": "^5.0.0-alpha.85",
"@mui/material": "^5.14.2",
"@mui/x-data-grid": "^6.6.0",
"@mui/x-date-pickers": "^7.12.0",
"@mui/x-date-pickers-pro": "^7.12.1",
"@refinedev/cli": "^2.16.38",
"@refinedev/core": "^4.54.1",
"@refinedev/devtools": "^1.2.8",
"@refinedev/mui": "^5.21.0",
"@refinedev/nestjsx-crud": "^5.0.9",
"@refinedev/react-hook-form": "^4.9.0",
"@refinedev/react-router-v6": "^4.6.0",
"@tanstack/react-query": "^4.10.1",
"dayjs": "^1.10.7",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-hook-form": "^7.43.5",
"react-hot-toast": "^2.4.1",
"react-infinite-scroll-component": "^6.1.0",
"react-router-dom": "^6.8.1"
},
"devDependencies": {
"@types/node": "^18.16.2",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.4.2",
"vite": "^5.1.6",
"vite-tsconfig-paths": "^4.2.1"
}
}
Binary file added examples/refine-hr-ce/public/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions examples/refine-hr-ce/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "Material UI base example",
"name": "Material UI base example",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Loading

0 comments on commit 6c2931a

Please sign in to comment.