1.2.11 • Published 9 months ago

@k3imagine/item-search v1.2.11

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

ItemSearch

To implement the item-search module into an Angular project, you will need to:

Install

To install the package,  run: npm i @k3imagine/item-search

Setup:

Include the library in your module

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ItemSearchModule } from '@k3imagine/item-search';  // <-- import it
import { AppComponent } from './app.component';

@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, ItemSearchModule], // <-- and include it
bootstrap: [AppComponent],
})
export class MyAppModule {}

Usage:

<lib-item-search
    #itemSearch
    mode="quantity"        
    [title]="The title of the popup"
    [confirmButtonText]="add / close button"
    [useMockDataWheninDev]="true"
    (onCloseModal)="closeItemsSearch($event)">
</lib-item-search>


The property 'useMockDataWheninDev' only comes into effect when running in
dev mode. If set to 'true', mock data will be used. If its set to 'false',
then you can use the gateway running locally to return the data.

InterCompany ItemSearch

InterCompany fetches the cost prices from the intercompany price list.
To enable send the following properties in <lib-item-search> tag.

[transferPriceType]="transferDetail.transferType"
[fromShopId]="transferDetail.fromShopId"
[toShopId]="transferDetail.toShopId"

The transferPriceType would be 1 from the following enum:
export enum TransferPriceTypeEnum {
    priceFromItemCost = 0,
    priceFromPriceList = 1  //Use InterCompany Price
}

Master Item Select

Usage:

<lib-master-item-select
    [showPopup]="showPopup"
    [title]="The title of the popup"
    [confirmButtonText]="add / close button"
    [useMockDataWheninDev]="false"
    (onCloseModal)="closeItemsSearch($event)"
> </lib-master-item-select>


To show the popup just set the boolean [showPopup] = true
NOTE: You should always set the 'showPopup' property back to false via the 
(onCloseModal) event.

The model that is passed back via the (onCloseModal) event is a number array 
of masterItemId's e.g [1,2,3,4].
If the form is cancelled then we pass back null.
1.2.8

9 months ago

1.2.7

9 months ago

1.2.6

9 months ago

1.2.9

9 months ago

1.2.10

9 months ago

1.2.11

9 months ago

1.2.5

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.2.4

2 years ago

1.1.5

2 years ago

1.2.3

2 years ago

1.1.4

2 years ago

1.0.5

2 years ago

1.2.2

2 years ago

1.1.3

2 years ago

1.0.4

2 years ago

1.2.1

2 years ago

1.0.3

2 years ago

1.0.0

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago