cc-erp-services v2.1.31-local.0
ERP SERVICES LIB
Contents
- Installation
- Modules
Installation
cc-erp-services is hosted in a verdaccio registry (private npm registry) at https://verdaccio.teljoy.io/
to install the library in your project, you should first add the registry and library scope to your project npm config:
1. in the root of your project, create a file called .npmrc
2. in that file add this rule
@maids:registry = https://verdaccio.teljoy.io/
This will inform npm to install all subpackages of @maids/ from the provided registry (our verdaccio server)
Then, to install @maids/cc-erp-services type in your console:
npm install --save @maids/cc-erp-services
This should save the library in your dependencies
Modules
cc-erp-services provides multiple modules related to interacting with maids.cc erp backend, following is a list of these modules and their respective documentation:
CCERPIntegrationModule - this module is purposed to integrate a new Angular12+ application into the existing legacy ERP system. view docs
CCAuthModule - concerned with managing the authentication state and features with the erp backend. view docs
CCLoadingIconModule - concerned with showing a loading icon (spinner or some other), and provides an interceptor to show the loading icon whenever a request is pending. view docs
Data type models - this library also exports the basic data types implemented in erp backend:
| model | description | member | type | param description | ||
|---|---|---|---|---|---|---|
BaseEntity | super-class for all entities in the backend @see 'Magnamedia Developer Guid' pdf booklet | id | number | id of the db record | ||
| creationDate | string | the entity id column in database | ||||
| creator | User['id'] | Serialized User object to define the object creator | ||||
| uuid | string | unique id assigned to this entity | ||||
| entityType | string | string that define the entity name | ||||
| lastModificationDate | string | serialized Java Date object to store the last modification date of the object | ||||
| lastModifier | User['id'] | serialized User object to define the last object modifier | ||||
| creatorModule | string | Module object to store the object creator module | ||||
EntityWithAttachments (extends BaseEntity) | represents a generic entity with a list of attachments. | attachmentsCount | number | cound of attachments | ||
| attachments | Array<EntityAttachment> | list of attachments of this entity | ||||
EntityAttachment (extends EntityWithAttachments) | an entity attached to another entity, this usually represents a file resource | version | number | |||
| name | string | name of the attached file | ||||
| size | number | size of the attached file in bytes | ||||
| extension | string | extension of file name (.png | .jpeg | ...etc) | ||
| path | string | where the file is stored on the server | ||||
| tag | string \| string[] | the tag associated with the file, in case of singular file upload, can be any string, in case of multiple file uploads, should be timestamp + some checksum | ||||
| ownerType | ||||||
| ownerId | ||||||
| uniqueTag | boolean | whether this tag is unique to this file (e.g. passport or tag1_12345675437ghjhaksd) | ||||
| amazon | boolean | |||||
| temporary | boolean | whether this is a temporary file or not | ||||
| fileType | string | type of file (e.g. "Image") | ||||
PicklistItem (extends EntityWithAttachments) | represents an item from a picklist | code | string | the unique code of this item | ||
| root | string | |||||
| rootId | string | |||||
| rootCode | string | |||||
| list | string | |||||
| listId | number | |||||
| tags | string[] | |||||
User (extends EntityWithAttachments) | represents a user object (without credentials) | activated | boolean | |||
| admin | boolean | |||||
| aswatCCLogin | string | |||||
| branch | {id: number; label: string} | |||||
| department | {id: number; label: string} | |||||
| departmentId | BaseEntity['id'] | |||||
| string | ||||||
| erpTheme | string | |||||
| external | boolean | |||||
| firstName | string | |||||
| lastName | string | |||||
| logingName | string | |||||
| phone | string | |||||
| positionId | number | |||||
| positions | Array<{id: number; code: string; label: string}> | |||||
| relatedEntityId | number | |||||
| relatedEntityType | string | |||||
| seenNotifications | boolean | |||||
| shift | string | |||||
| superUser | boolean | |||||
| type | {id: number; label: string} | |||||
| typeId | number | |||||
| ziwoAgentId | number | |||||
| freedomUser | boolean | |||||
| guest | boolean |
2 years ago