Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix readme #88

Merged
merged 12 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 196 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Welcome to Unity, your all-in-one solution for seamless leave and employee manag

It is an open-source cross-platform Leave management app written in Dart using Flutter.

---- Cover image----
<img src="./screenshots/Unity.png" />

## Download App

<img src="./cta/play-store.png" width="200" ></img> <img src="./cta/app-store.svg" width="200"></img>
<a href="https://play.google.com/store/apps/details?id=com.canopas.projectunity&hl=en_IN&gl=US"><img src="./cta/google play.png" width="200" ></img> <img src="./cta/app store.png" width="200"></img>

## Features 🌟🌟

Expand Down Expand Up @@ -59,13 +59,205 @@ It is an open-source cross-platform Leave management app written in Dart using F

### Using the App

To get started using Unity, refer to the [User Guide](https://github.com/canopas/canopas_unity/blob/update-readme/wiki/user_guide.md) for detailed information on how to navigate, create spaces, add employees, and manage leaves efficiently.
<details>

<summary>User Guide</summary>

### Getting Started With Unity
Welcome to Unity, your all-in-one solution for seamless leave and employee management within your organizations.
Unity introduces three distinct roles: **Admin**, **HR**, and **Employee**. Let's guide you through the initial steps to ensure a smooth start.

#### Sign-in
- To get started with unity, signing in with Google or Apple

#### Create a new Space
- After signing in, you have a option to create a new space. By default, the creator is assigned as the **Admin** role, granting full access,including the ability to edit or remove the space if no longer needed.
cp-sneha-s marked this conversation as resolved.
Show resolved Hide resolved

#### Joining a Existing Space:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "an" instead of "a" before "Existing Space" as the following word starts with a vowel sound.

- #### Joining a Existing Space:
+ #### Joining an Existing Space:

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
#### Joining a Existing Space:
#### Joining an Existing Space:

- If you've been invited to join a space, these invitations will be visible after signing in. Simply select the space to join it.
- Invited members are assigned the default role of **Employee**. The role can be edited later by admin after the user has joined the space.


### Admin Role:

As an Admin, you have the highest level of permissions, allowing you to:

#### * Create Spaces
- After Successful Sign in With Google or Apple.
- Navigate to Spaces screen.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems likely that a possessive apostrophe is missing. Consider revising to clarify ownership.

- - Navigate to Spaces screen.
+ - Navigate to the Spaces screen.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
- Navigate to Spaces screen.
- Navigate to the Spaces screen.

- Click on **_Create New Space_**.
- Fill in the required details and confirm.

#### * Edit Space
- Click on **☰** button on the left side on Home screen.
- Click on **_Edit space_** to edit it.

#### * Manage Leave Request
- The home screen displays all pending leave requests.
- Review pending requests and approve or reject them. (Employee will receive notification mail for the leave approval/rejection)

#### * View Leave History
- Go to the **_Leaves_** Tab.
- Apply filters to view leaves of specific employees.
(Can see all Details of the Leaves.)

#### * Manage Employees
- Go to **_Members_** tab
- Invite New Member,
- To Invite new member, Click on **_Invite_** button.
cp-sneha-s marked this conversation as resolved.
Show resolved Hide resolved
- Add Email of user and confirm.
(User will receive invitation mail - planned.)
- For existing members,
- Click on a specific employee to see detailed information.
cp-sneha-s marked this conversation as resolved.
Show resolved Hide resolved
- You can _**Edit**_ or _**Deactivate**_ them.
(After Deactivate user, User will lose access of the space.)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"access of" might be more accurately expressed as "access to".

-       (After Deactivate user, User will lose access of the space.)
+       (After deactivating a user, the user will lose access to the space.)

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
(After Deactivate user, User will lose access of the space.)
(After deactivating a user, the user will lose access to the space.)


### HR Role

As an HR User, Your permissions are same as Admin including:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an article before "Admin" and a comma after "including" for clarity.

- As an HR User, Your permissions are same as Admin including:
+ As an HR User, your permissions are the same as an Admin, including:

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
As an HR User, Your permissions are same as Admin including:
As an HR User, your permissions are the same as an Admin, including:


#### * Manage Employees
(Can't change Role of the employee)
#### * View Leave History
#### * Manage Leave Request
#### * Request Leave
- Go to Leaves Tab
- Click on **+** Button to apply leave.
(Only Admin can review your leave request and approve/reject it.)

### Employee Role

As an Employee, you can:

#### * Request Leave
- Go to Leaves Tab.
- Click on **+** Button to apply leave.
(Only Admin/HR can review your leave request and approve/reject it.)

#### * View Leave History
- Can see Leave Details of coworkers except reason .
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the space before the period.

- - Can see Leave Details of coworkers except reason .
+ - Can see Leave Details of coworkers except reason.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
- Can see Leave Details of coworkers except reason .
- Can see Leave Details of coworkers except reason.

- Can see only upcoming Leaves of coworkers.
(Go to Members tab, Click on member and you can see upcoming leaves of the member.)

#### * Update Personal Information
- Click on **☰** button on the left side on Home screen.
cp-sneha-s marked this conversation as resolved.
Show resolved Hide resolved
- Click on **_Personal Details_** to Update it.
(As an employee, you can't change your role within the organization.)

</details>

### Run locally
> **Note**: This project uses firebase realtime and firestore database and firebase authentication💥
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider correcting the spelling of "Firebase" to ensure consistency and accuracy.

- > **Note**: This project uses firebase realtime and firestore database and firebase authentication💥
+ > **Note**: This project uses Firebase Realtime Database and Firestore Database, and Firebase Authentication💥

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
> **Note**: This project uses firebase realtime and firestore database and firebase authentication💥
> **Note**: This project uses Firebase Realtime Database and Firestore Database, and Firebase Authentication💥


<details>

<summary>Project Setup Instructions</summary>

## Set-up Guide

#### 1. [Flutter Environment Setup](https://docs.flutter.dev/get-started/install)
> **Note**: Flutter sdk version `'>=3.2.0 <4.0.0'` is recommended to run project.

For project setup instructions, please refer to the [Set up Guide](https://github.com/canopas/canopas_unity/blob/update-readme/wiki/setup.md) section
#### 2. Clone the repo
```sh
$ git clone https://github.com/canopas/canopas-unity.git
```
#### 3. Rename the app Package Name
* Rename the app package name (because this can affect the Firebase).
* You can do it manually or using this package [Rename Package](https://pub.dev/packages/rename) or look at this [Stackoverflow Question](https://stackoverflow.com/questions/51534616/how-to-change-package-name-in-flutter).

#### 4. Setup the Firebase app
cp-sneha-s marked this conversation as resolved.
Show resolved Hide resolved
* You'll need to create a Firebase instance. Follow the instructions at https://console.firebase.google.com.

#### 5. Enable Google Authentication
* Go to the Firebase console for your new instance.
* Click "Authentication" in the left-hand menu.
* Click the "sign-in method" tab.
* Click the "Google" and enable it.

#### 6. Enable the Firebase Database
* Go to the Firebase Console.
* Click "Firestore Database" in the left-hand menu.
* Click the "Create Database" button.
* It will prompt you to set up, rules, for the sake of simplicity, let us choose test mode, for now.
* On the next screen, select any of the locations you prefer.

#### 7. Add Flutter App in Firebase
* In the Firebase console, in the settings of your project.
* Click on the Flutter Icon to add the Flutter app.
* Follow the instructions to add the Flutter app.

<img src="./screenshots/flutter_firebase_register.png" width="1050" ></img>

* It will create a `firebase_options.dart` file in the `lib` folder.

#### 8. Get Google ClientId for app
* Go to [Google APIs console](https://console.cloud.google.com/apis/).
* On the top bar, Choose your project from the drop-down menu if the selected default project is not your current project.
* Click on the "API APIs and services".

<img src="./screenshots/google-cloud-console.png" width="1080"></img>

* On the left side menu, Select "Credentials".
* Click on the "Web client(auto created by Google Service)".
* Copy **"Client Id"** and **"Client Secret"** (We will use in next step).

#### 9. Create Local file
* Add a new dart file named `desktop_credentials` in the `lib` folder.
* Add the below Code in the file.
```
const String googleClientId =
"YOUR_GOOGLE_CLIENT_ID";
const String authClientSecret = "YOUR AUTH_CLIENT_SECRET";
```

#### * Run app on Android
* Run the following command from the project folder to get your SHA-1 key:

```
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
```

* Open the Android app within your Firebase console.
* Add your SHA-1 key by clicking "Add Fingerprint".
* Download google-services.json.
* Replace it with the old `google_services.json` in `android/app/` (You can also do it by Flutterfire CLI).

#### * Run the app on iOS
* Open XCode, right-click the Runner folder, select the "Add Files to 'Runner'" menu, and select the GoogleService-Info.plist file to add it to /ios/Runner in XCode.
* Open /ios/Runner/Info.plist in a text editor.
* Then add the CFBundleURLTypes attributes.
```
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<!-- TODO Replace this value: -->
<!-- Copied from GoogleService-Info.plist key REVERSED_CLIENT_ID -->
<string>com.googleusercontent.apps.861823949799-vc35cprkp249096uujjn0vvnmcvjppkn</string>
</array>
</dict>
</array>
```
* When running the app on the simulator for the first time, it may take a longer time to build.

#### * Run the app on the web
* Open the "Credentials" page of the [Google APIs console](https://console.cloud.google.com/apis/).
* Click on the `Web client (auto-created by Google Service)`.
* Copy the `Client ID` located at the top left side of the page.
* Open the web/index.html file, and add the following meta tag.
```
<meta name="google-signin-client_id" content="YOUR_GOOGLE_SIGN_IN_OAUTH_CLIENT_ID.apps.googleusercontent.com">

```
* Add localhost entries if you are running an app on a specific port on `Authorized JavaScript origins` or use the port that is already specified in this field.
* Run `flutter run -d chrome --web-hostname localhost --web-port 7357`.
* Replace the port with the one you added to the `Authorized JavaScript origins` fields.

</details>

## Support 🤝

Expand Down
Binary file added cta/app store.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 0 additions & 46 deletions cta/app-store.svg

This file was deleted.

Binary file added cta/google play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed cta/play-store.png
Binary file not shown.
Loading
Loading