Giter Club home page Giter Club logo

crm's Introduction

Crm

This is a simple CRM for companies that deal with serviceable equipment they sell or rent out.

Steps:

  1. mix phx.new crm
  2. Get into the folder
  • mix ecto.create
  1. mix phx.gen.live Countries Country countries name:string
  • copy routes to router.ex
  • mix ecto.migrate
  1. mix phx.gen.live Companies Company companies name:string billingadd1:text billingadd2:text postalcode:string country_id:references:countries
  • copy routes to router.ex
  • mix ecto.migrate
  1. modify the company.ex to properly link to countries
  • remember to preload the data in companies so that it shows in the index
  1. mix phx.gen.live Contacts Contact contacts name:string email:string mobileno:string officeno:string location:text company_id:references:companies
  • copy routes to router.ex
  • mix ecto.migrate
  1. modify the contact.ex to properly link to companies
  • remember to preload the data in contact so that it shows up in index
  1. mix phx.gen.live Contracts Contract contracts do:string po:string itq:string startdate:date enddate:date type:string svcalloperdevice:integer timeallo:integer value:float active:boolean company_id:references:companies
  • copy routes to router.ex
  • mix ecto.migrate
  1. modify the contract.ex to properly link to companies
  2. Work on the drop down lists by listing all and using Enum.map
  • Countries in Company
  • Companies in Contacts
  • Companies in Contracts
    • modify the index.ex defp apply actions for the new and edit to assign the respective variables
    • pass the variable through index.html.heex to form_component
    • Enum.map in the options for the select type
  1. Add c/o and remarks and contractno into contracts
    • mix ecto.migration add_careof_and_remarks
    • alter contracts table to add careof and remarks
    • update contract.ex to include the new fields
    • mix ecto.migrate
  2. mix phx.gen.live Devices Device devices contract_id:references:contracts serialno:string brand:string model:string currentlocation:text active:boolean remarks:text
  • copy routes to router.ex
  • mix ecto.migrate
  1. modify the device.ex to properly link to companies and contracts
  2. Work on the drop down lists by listing all and using Enum.map
  • Companies in Devices
  • Contracts in Devices
  1. Create the dummy database entries in seeds.exs
  2. Create the simple authentication with user and profiles
  1. mix ecto.gen.migration add_name_profile_role
  • added profile, role and active
  • add in migration changes
  • add fields in user.ex and amend changeset
  1. Follow the steps in the github link
  2. adding pagination for all tables
  1. create function in lib/crm/devices.ex
  • def paginate_devices
  • modify lib/crm_web/live/device_live/index.ex in def mount sockets
  • have to amend show.ex to include the load the associations so that the dropdown works
  1. do the same for
  • contracts
  • contact
  • company
  • country
  1. mix phx.gen.live Records Record records svcno:string svcdate:date timeused:integer device_id:references:devices contact_id:references:contacts engineer_id:references:users createdby_id:references:users
  • copy routes
  • adjust schema at record.ex
  • mix ecto.migrate
  1. added some sorting order when displaying indexes for
  • countries
  • companies
  • contacts
  • contracts
  • devices
  • records
  • accounts
  1. added a preload to pagination in records.ex so it will display contact and device models
  2. list only engineers in creating new service records with engineer
  3. made the table conditional in contracts.html.heex to show expiring contracts within the next 90 days
  4. show active and expiring contracts in company show.html.heex only
  • one by query
  • one by css in display
  1. only show last 3 years service records in company show.html.heex
  • by query

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.