Code Monkey home page Code Monkey logo

megalavania's People

Contributors

darrylhardin avatar nickolasjadams avatar

Watchers

 avatar  avatar

megalavania's Issues

Add a .gitignore file and showcase Github Projects

Here's a gitignore.
But I'm also using this as an opportunity to show Githubs built in Issues and automated project boards.

I've never used Asana for a project, but I noticed that it does a lot of the things that Github Projects does.

I've used other project management software as well. Jira, and zenhub.
Personally I think that those 2 might be overkill for a small project.

I'm open to using Asana, but I'd like you to checkout the Github Projects tab as well.

Add All Models

Now that the migrations should be done, or we at least have them with a good start I'll create the models

orders Schema and Migration

Table orders {
id int [pk, increment]
user_id int [ref: > users.id]
customer_id int [ref: > customers.id]
price decimal(9,2)
deposit decimal(9,2)
paid bool
initial varchar(8)
comment text(1000)
brand_id int [ref: > brands.id]
stock_number text(30)
product_name text(50)
order_status_id int [ref: > order_statuses.id]
created_at timestamp
updated_at timestamp
}

customers Schema and Migration

Table customers {
id int [pk, increment]
user_id int [ref: > users.id]
first_name varchar
last_name varchar
phone varchar
email varchar
sms boolean
created_at timestamp
updated_at timestamp
}

Cloning Repository

So I tried to clone the branch repo you put up, it copied locally just fine but I'm apparently missing something. I did notice the vendors aren't included (which makes sense because that would be huge) so I copied my vendors over to that folder. I tried to run php artisan migrate and got a warning that this was in production and did I want to do that. I said yes then got the error shown in the attached image. It also shows a 500 error when I try to run it locally. For context of my environment, I use artisan to do commands but I use Xampp to host since I couldn't figure out how to work the database with artisan.

php artisan migrate

Order Statuses

We have a potential issue with order statuses, we talked about making initial order statuses for everyone or filling them somewhere in the backend. One of the issues we have is the position column, we are going to be allowing the customer to have them show in any order they want but they wouldn't be able to change positions of the default order statuses, and this becomes an issue with either way we do this. It might be the best solution to just give every customer their own order statuses even if they're the same so we can keep those accurate. The other thing we could do is make a many-to-many relationship, though I feel this complicates the issue a bit more than needed since the majority of other order statuses aren't going to need the bridge table, unless we did a similar thing to the order statuses as we have with the brands tables.

Nick - We should organize our views different

I noticed you had your orders as 'orders' for the main index page and then you had 'orders-create' for the create page. This obviously works and makes sense, but I'm inclined to suggest we create folders instead.

So each one would go in it's own folder.

So instead of view/orders.blade.php we would have view/orders/index.blade.php and for the create it would obviously be similar view/orders/create.blade.php. Between the one you are currently doing and what I'm suggesting there really isn't any difference that I'm aware of, but I like folders as they're easier on the eyes and if we ever needed more views beyond the basics I feel it's more clear on what's going on. The downside could potentially be that you are editing a filed called 'index' thinking it's for some other template. But VS code does a good job in making sure you know what you're on, so it might be a non-issue.

Create brand form control

The brand form is working to an extent, it allows a user to input data but doesn't allow them to pick from existing categories, the form also doesn't check for unique names and throws an error if the name is already taken instead of just adding the brand to the user. The user also isn't added to the brand whether or not it exists and needs to be added.

  • List categories in drop-down menu
  • Check if submitted brand exists
  • Create brand name check - insert if doesn't exist
  • Update brand_user table to Assign user to brand

redirect with user

This may be a non-issue but the website when logged out will redirect back to the page you were at when logging back in, this is fine if a system is only using one account, but if someone shares a computer or has multiple accounts for some reason they will get an error because of the way we get the user_id from the slug.

users Schema Design and Migration

Table users {
id int [pk, increment]
business_name varchar
logo_path varchar
email varchar
password varchar
created_at timestamp
updated_at timestamp
godmode boolean
package_id int [ref: > packages.id]
// Here's a question. How are we going to handle people who's payments bounce?
// Assumed solution. Let them access their order info. But they can't create new orders.
account_status enum('paid', 'due', 'bounced')
}

Businesses Schema and Migration

no frills bro.
Let's just start with some basic information you'd find on a website.
Business Name
Logo path
Contact info

Building out BrandController

  • add Brands to navigation layout
  • create route index
  • create query to retrieve data from joined tables to get brands by user.
  • create brand form and route (likely just take from orders page and form for now
  • create insert command for brands

This may get broken down into smaller bits, but I'll attempt get the BrandController set up as much as possible

Create order form logic

Creating new orders from order form.

Needs to check if the customer exists and add a new one if they do not, should probably give real results as the customer field is typed in, this can be done through livewire which I think we should implement into our website.

We could allow the creation of most of the foreign keys straight from the order table as a fast option.

check and create if doesn't exist:

  1. customer_id
  2. b2b_business_id
  3. brand_id
  4. order_status_id?

To Do

  • Create order form (placeholder)
  • insert customer if doesn't exist
  • insert business if doesn't exist
  • insert brand if doesn't exist
  • insert new order status if doesn't exist?
  • insert new order with previously or newly created data

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.