Coder Social home page Coder Social logo

amitxshukla / erp-apps-crm-cloud-angular_firebase Goto Github PK

View Code? Open in Web Editor NEW
66.0 7.0 31.0 3.26 MB

ERP Apps - CRM Cloud Angular 11 and Google FireStore database, Role based security

TypeScript 35.79% HTML 63.07% CSS 0.77% SCSS 0.37%
angular firebase angular9 firestore erpapps apps crm angular11

erp-apps-crm-cloud-angular_firebase's Introduction

- If you like this project, please consider giving it a star (*) and follow me at GitHub & YouTube.

ERP-Apps

Objective

Build ERP apps for Small, Medium and Large Organizations
Re-Write / Build new CRM GUI App for existing ERP
Convert Old Software to new App/UI (Desktop & Mobile) without changing database
Migrate existing ERP to new platform
Make an App for existing Oracle, PeopleSoft, SAP, or Siebel CRM or old custom software based ERP

Community Version - All apps are Free download with complete source code for iOS, Android and web.
Click here for Video Tutorials !

Installation Instructions
Step 1: Install your favorite Code editor
Anroid Studio, IntelliJ community edition, Visual Studio Code

Step 2: download node js
make sure, your windows, linux or mac environment path is setup to the directory where your node.exe file is
for example

Path  = c:\amit.la\Program\node
now run following commands in terminal window
$ node -v
$ npm -v
make sure both the these commands return a valid node and npm version.
now install angular cli
$ npm install -g @angular/cli
// after installation
$ ng version
make sure ng version returns a valid Angular cli version.

Step 3: download this GitHub repository - Fork/Download Zip 
extract all files to your c drive and browse to the directory where you can see package.json
$ npm install --save
make sure installation finished without any error
$ ng serve --open
at this point, your app will serve on localhost:4200 but it show some errors because your firebase in not setup yet

Step 4: Setup Firebase project 
go to -> console.firebase.com
set up a new project
inside your project, click on authentication and enable
email/password, Google and Facebook authentication methods
now setup Firebase rules
please copy paste these rules as-is and make sure, there are no errors anywhere.
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
  allow read, write: if false;
}

match /USER_ROLES/{document} {
allow read: if isSignedIn();
}
match /USER_SETTINGS/{document} {
allow read: if (isSignedIn() && isDocOwner()) || isAdmin();
allow create: if isSignedIn() && onlyContentChanged();
allow update: if (isSignedIn() && isDocOwner() && onlyContentChanged()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_ADDRESSBOOK/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_CAMPAIGN/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_LEADS/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_OPPURTUNITY/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_APPOINTMENTS/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_CALLS/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_TICKETS/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_WORKORDERS/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
match /USER_ORDERS/{document=**} {
allow read: if (isSignedIn() && isEmployee()) || isAdmin();
allow create: if isSignedIn();
allow update: if (isSignedIn() && isDocOwner()) || isAdmin();
allow delete: if isAdmin();
}
// helper functions
function isSignedIn() {
return request.auth.uid != null;
}
function onlyContentChanged() {
return request.resource.data.role == "" || request.resource.data.role == resource.data.role;
// make sure user is not signing in with any role or changin his role during update
}
function isDocOwner() {
return request.auth.uid == resource.data.author;
}
function isDocCreater() {
return request.auth.uid == request.resource.data.author;
}
function isAdmin() {
return get(/databases/$(database)/documents/USER_SETTINGS/$(request.auth.uid)).data.role == "admin";
}
function isEmployee() {
return get(/databases/$(database)/documents/USER_SETTINGS/$(request.auth.uid)).data.role == "employee";
}
}
}
Step 5: Create new data collection
as shown in this screen and make sure all documents/fields look exactly the same.

YouTube video Part -1 @ 13:08

USER_ROLES is a collection
admin is a document inside it
admin, addressbook etc each has a “map” inside
Which has four fields each
visible Boolean true
read Boolean true
write Boolean true
delete Boolean true

Step 6: find Firebase Project settings
copy and replace Firebase settings in your app->environments/environment.ts and environment.prod.ts


Step 7: Browse App 
to check if your app is up and running now if not, please open browser console and look for errors

if firebase is not setup properly or settings are not copies correctly, you will see error like invalid API Key.

For any other error please open a new issue and include a screen shot of your terminal and browser console window.

Pro Version Enquiries [email protected] - ERP

Other Apps -> CRM Cloud
Marketting
Helpdesk
BPO/Call Register
Customer Order Fullfillment

Supply Chain
Buy To Pay
Customer Order Fullfillment
Sales
Live Inventory

Finance
Book Keeping
Accounts Payable
Accounts Receivable
Expense Management
Assets management

HCM Employee Management App
Supply Chain App
Inventory Management App
Book Keeping App
Buy to Pay B2P App
Accounts Payables App
Accounts Receivables App
Vendor Management App
Help Desk App
Call Center App
Order Fullfillment App
Product Catalogue
Order Fullfillment App
Expense Management
Assets management
Warehouse Management App

Requisition -> Generate Req and auto PO
PO -> Request Inventory
Receipt -> Receive Inventory
Payables -> Setup Vendor
-> Voucher for Vendor
-> Pay Vendor
Receivables-> Setup Customer
-> Invoice for Customer
-> Receive
Sales Register

Reports

Inventory Cycle Count
Inventory Snapshot
report - On Hand Inventory
Payables -> Setup Vendor
-> Voucher for Vendor
-> Pay Vendor

erp-apps-crm-cloud-angular_firebase's People

Contributors

amitxshukla avatar

Stargazers

 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

erp-apps-crm-cloud-angular_firebase's Issues

Cannot read property 'uid' of null

Everything is correct I have followed the video and the GitHub code, but I am getting an error. I don't know where did I go wrote here. The error appears on settings.component.ts when I try to create a new admin.

getting error in setting up on localhost

$ ng serve --open
An unhandled exception occurred: listen EADDRNOTAVAIL: address not available 192.168.64.2:4200
See "/private/var/folders/c6/s_mrmh_544j4wqtmz6l8lrym0000gn/T/ng-Seo1My/angular-errors.log" for further details.

Kindly tell, how to solve this..

How to create user_roles collection

Hi
I saw your video . how to create user_roles collection and you share collection structure for this
user_roles . your video shows already created shows

so i need how to create user_roles collection
can you share with me . helpful for me

I am not able to make dropdown admin component visible

I am trying to deveop an app and was following your youtube videos. i need to make 4 roles admin,senior manager,telecaller and counsellor. and was following your code and using firebase for backend. i exactly copied your code but i am not able to compile the code. backend.service.ts has get docs file and it shows the error that 'not all code paths return a value'. also in the header.component.html file dropdown item admin and address book shows the error(<input type="hidden" name="author" id="author" [ngModel]="(data$ | async)?.author" required>) that 'property admin does not exist on type unknown'. and in admin.component.html it shows the error again that ( <input matInput placeholder="Name" name="name" id="name" [ngModel]="(data$ | async)?.name" required) 'property admin does not exist on type unknown'. this error is shown for name ,phone,author,email,role etc. can you please help me with this. I am not using any of the crm properties. stuck with this for 2 days and nobody is there for me tio help. struggling with this and dont know what to do. I can mail you or contact you if you are ready to hear about the problem in details. thanks in advance . Ayisha please help me I am in need .attaching the error photos with the mail. thank you
IMG_20210802_164354
IMG_20210802_164403
IMG_20210802_164413
IMG_20210802_164423

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.