Giter VIP home page Giter VIP logo

angular-commerce's People

Contributors

ashu3752 avatar dependabot[bot] avatar nosovk avatar oleksmir avatar yaroslavoshyyko avatar yhdesai 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  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  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

angular-commerce's Issues

Why you don't use array methods?

you use

addProduct(){
  let attributes = {};
  let tags = [];
  for(let i = 0; i < this.addedAttributes.length; i++){
    let attr = this.addedAttributes[i];
    attributes[attr.id] = attr.childs;
  }
  for(let i = 0; i < this.addedTags.length; i++){
    let tag = this.addedTags[i];
    tags.push(tag.id);
  }
  this.productForm.patchValue({
    attributes:  attributes,
    tags: tags
  });
  console.log(this.productForm.controls);
  this.dal.addProduct(this.productForm.value);
}

instead

addProduct(){
  let attributes = this.addedAttributes.reduce((result, attribute) => {
    result[attribute.id] = attribute.childs;
    return result;
  }, {});
  
  let tags = this.addedTags.map(({ id }) => id);
  this.productForm.patchValue({ attributes, tags });
  console.log(this.productForm.controls);
  this.dal.addProduct(this.productForm.value);
}

I ask, for the sake of self-education. You use for loop instead of forEach/reduce cos forloop more faster?

Status - DAL outdated

Hi,

I am very curious to the status of this project. Will there be released a tutorial/starter kit as promised in another thread or will the DAL be update to newest firebase api/firestore? I am trying to fix it myself, however, as an amateur programmer, I do not have the skills (unfortunately).

I think this is an awesome project and I hope that you are still working on it! Thumbs up!

Best regards,

I am getting the below error .how to solve

ERROR in ./node_modules/@nodeart/store-components/modules/add-product-component/src/add-product.module.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /FreshFarm/node_modules/@nodeart/store-components/modules/add-product-component/src/add-product.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in thelibrary repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
at AngularCompilerPlugin.getCompiledFile (/FreshFarm/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:719:23)
at plugin.done.then (/FreshFarm/node_modules/@ngtools/webpack/src/loader.js:41:31)
at process.internalTickCallback (internal/process/next_tick.js:77:7)

How to get started?

I understand that what you have here is an ecosystem for commerce workflow based upon angular.js. It may seem really dumb, but how do I get started with it? I want to fiddle around with it just to get it to know better.

TIA!

Error while building the application

Dear Maintainers,

I'm trying to build the version on latest develop (commit hash: 96dfcd6259649eb16125ecb68e0d50520466c5f4). First I call "npm install" to install the dependencies and after that if I try to build the application with "npm run build:dev-ng-spree" I get following error messages:

ERROR in src/app/auth/effects/auth.effects.ts(25,45): error TS2344: Type 'string | User' does not satisfy the constraint 'ObservableInput<any>'.  Type 'User' is not assignable to type 'ObservableInput<any>'.
    Type 'User' is not assignable to type 'Iterable<any>'.
      Property '[Symbol.iterator]' is missing in type 'User'.
src/app/auth/effects/auth.effects.ts(49,46): error TS2345: Argument of type '(_: Action) => Observable<RatingCategory[]>' is not assignable to parameter of type '(value: Action, index: number) => RatingCategory[]'.
  Type 'Observable<RatingCategory[]>' is not assignable to type 'RatingCategory[]'.
    Property 'length' is missing in type 'Observable<RatingCategory[]>'.
src/app/auth/effects/auth.effects.ts(53,51): error TS2345: Argument of type '{}' is not assignable to parameter of type 'RatingCategory[]'.
  Property 'length' is missing in type '{}'.
src/app/checkout/effects/checkout.effects.ts(24,7): error TS2344: Type 'Order' does not satisfy the constraint 'ObservableInput<any>'.
  Type 'Order' is not assignable to type 'Iterable<any>'.
    Property '[Symbol.iterator]' is missing in type 'Order'.
src/app/checkout/effects/checkout.effects.ts(36,52): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Order'.
  Property 'id' is missing in type '{}'.
src/app/checkout/effects/checkout.effects.ts(43,23): error TS2344: Type 'Order' does not satisfy the constraint 'ObservableInput<any>'.
  Type 'Order' is not assignable to type 'Iterable<any>'.
src/app/checkout/effects/checkout.effects.ts(44,56): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Order'.
src/app/checkout/effects/checkout.effects.ts(52,7): error TS2344: Type 'Order' does not satisfy the constraint 'ObservableInput<any>'.
  Type 'Order' is not assignable to type 'Iterable<any>'.
src/app/checkout/effects/checkout.effects.ts(59,56): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Order'.
src/app/checkout/effects/checkout.effects.ts(73,7): error TS2344: Type 'Order' does not satisfy the constraint 'ObservableInput<any>'.
  Type 'Order' is not assignable to type 'Iterable<any>'.
src/app/checkout/effects/checkout.effects.ts(81,55): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Order'.
src/app/checkout/effects/checkout.effects.ts(89,7): error TS2344: Type 'Order' does not satisfy the constraint 'ObservableInput<any>'.
  Type 'Order' is not assignable to type 'Iterable<any>'.
src/app/checkout/effects/checkout.effects.ts(98,52): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Order'.
src/app/core/index.ts(51,22): error TS2339: Property 'forRoot' does not exist on type 'typeof NgProgressModule'.
src/app/core/index.ts(54,26): error TS2339: Property 'forRoot' does not exist on type 'typeof NgProgressHttpModule'.
src/app/modules/search/store/effects/search.effects.ts(15,34): error TS2344: Type 'SearchResponse' does not satisfy the constraint 'ObservableInput<any>'.
  Type 'SearchResponse' is not assignable to type 'Iterable<any>'.
    Property '[Symbol.iterator]' is missing in type 'SearchResponse'.
src/app/modules/search/store/effects/search.effects.ts(21,49): error TS2345: Argument of type '{}' is not assignable to parameter of type 'SearchResponse'.
  Property 'data' is missing in type '{}'.
src/app/product/effects/product.effects.ts(56,52): error TS2345: Argument of type '(action: Action & { payload: any; }) => Observable<Review[]>' is not assignable to parameter of type '(value: Action & { payload: any; }, index: number) => Review[]'.
  Type 'Observable<Review[]>' is not assignable to type 'Review[]'.
    Property 'length' is missing in type 'Observable<Review[]>'.
src/app/product/effects/product.effects.ts(60,52): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Review[]'.
  Property 'length' is missing in type '{}'.
src/app/product/effects/product.effects.ts(67,37): error TS2345: Argument of type '(_: Action) => Observable<Brand[]>' is not assignable to parameter of type '(value: Action, index: number) => Brand[]'.
  Type 'Observable<Brand[]>' is not assignable to type 'Brand[]'.
    Property 'length' is missing in type 'Observable<Brand[]>'.
src/app/product/effects/product.effects.ts(70,56): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Brand[]'.
  Property 'length' is missing in type '{}'.
src/app/product/effects/product.effects.ts(76,37): error TS2344: Type 'Review' does not satisfy the constraint 'ObservableInput<any>'.
  Type 'Review' is not assignable to type 'Iterable<any>'.
    Property '[Symbol.iterator]' is missing in type 'Review'.
src/app/product/effects/product.effects.ts(79,65): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Review'.
  Property 'id' is missing in type '{}'.
src/app/product/effects/product.effects.ts(85,58): error TS2345: Argument of type '(action: Action & { payload: any; }) => Observable<RatingOption[]>' is not assignable to parameter of type '(value: Action & { payload: any; }, index: number) => RatingOption[]'.
  Type 'Observable<RatingOption[]>' is not assignable to type 'RatingOption[]'.
    Property 'length' is missing in type 'Observable<RatingOption[]>'.
src/app/product/effects/product.effects.ts(89,52): error TS2345: Argument of type '{}' is not assignable to parameter of type 'RatingOption[]'.
  Property 'length' is missing in type '{}'.
src/app/user/effects/user.effects.ts(18,37): error TS2345: Argument of type '(_: Action) => Observable<Order[]>' is not assignable to parameter
of type '(value: Action, index: number) => Order[]'.
  Type 'Observable<Order[]>' is not assignable to type 'Order[]'.
    Property 'length' is missing in type 'Observable<Order[]>'.
src/app/user/effects/user.effects.ts(21,57): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Order[]'.
  Property 'length' is missing in type '{}'.
src/app/user/effects/user.effects.ts(27,39): error TS2345: Argument of type '(_: Action) => Observable<Address[]>' is not assignable to parameter of type '(value: Action, index: number) => Address[]'.
  Type 'Observable<Address[]>' is not assignable to type 'Address[]'.
    Property 'length' is missing in type 'Observable<Address[]>'.
src/app/user/effects/user.effects.ts(30,65): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Address[]'.
  Property 'length' is missing in type '{}'.
src/app/user/effects/user.effects.ts(36,39): error TS2345: Argument of type '(_: Action) => Observable<Country[]>' is not assignable to parameter of type '(value: Action, index: number) => Country[]'.
  Type 'Observable<Country[]>' is not assignable to type 'Country[]'.
    Property 'length' is missing in type 'Observable<Country[]>'.
src/app/user/effects/user.effects.ts(39,61): error TS2345: Argument of type '{}' is not assignable to parameter of type 'Country[]'.
  Property 'length' is missing in type '{}'.
src/app/user/effects/user.effects.ts(45,52): error TS2345: Argument of type '(action: Action & { payload: any; }) => Observable<CState[]>' is not assignable to parameter of type '(value: Action & { payload: any; }, index: number) => CState[]'.
  Type 'Observable<CState[]>' is not assignable to type 'CState[]'.
    Property 'length' is missing in type 'Observable<CState[]>'.
src/app/user/effects/user.effects.ts(48,55): error TS2345: Argument of type '{}' is not assignable to parameter of type 'CState[]'.
  Property 'length' is missing in type '{}'.
src/app/user/effects/user.effects.ts(54,37): error TS2344: Type 'Object' does not satisfy the constraint 'ObservableInput<any>'.
  The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
    Type 'Object' is not assignable to type 'Iterable<any>'.
      The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
        Property '[Symbol.iterator]' is missing in type 'Object'.

Is there an additional step, that is needed before build?

LICENSE

Any plan to update license for the repo? hope it is not GPL :)

I see that NPM registry says MIT license for most of your package, it would be helpful to put the LICENSE file.

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.