ionic-vhframeworks 10.0.6 → 10.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -744,7 +744,7 @@ export declare class VhAuth {
|
|
|
744
744
|
signInWithEmailAndPassword_AutoWeb_Developer(email: string, password: string): Promise<unknown>;
|
|
745
745
|
/**
|
|
746
746
|
* @example:
|
|
747
|
-
* this.vhAuth.
|
|
747
|
+
* this.vhAuth.onAuthStateChanged_AutoWeb_Designer()
|
|
748
748
|
.then((rsp)=>{
|
|
749
749
|
if(rsp.vcode===0){
|
|
750
750
|
//Designer
|
|
@@ -768,7 +768,34 @@ export declare class VhAuth {
|
|
|
768
768
|
* vcode === 0: Designer logged in successfully
|
|
769
769
|
* vcode === 10: Developer logged in successfully
|
|
770
770
|
*/
|
|
771
|
-
|
|
771
|
+
onAuthStateChanged_AutoWeb_Designer(): Promise<unknown>;
|
|
772
|
+
/**
|
|
773
|
+
* @example:
|
|
774
|
+
* this.vhAuth.onAuthStateChanged_AutoWeb_Developer()
|
|
775
|
+
.then((rsp)=>{
|
|
776
|
+
if(rsp.vcode===0){
|
|
777
|
+
//Designer
|
|
778
|
+
this.vhQueryAutoWeb.syncCollections_Desktop()
|
|
779
|
+
.then(()=>{
|
|
780
|
+
do something.....
|
|
781
|
+
console.log('user', user);
|
|
782
|
+
})
|
|
783
|
+
}else if(rsp.vcode===10){
|
|
784
|
+
//Developer
|
|
785
|
+
this.vhQueryAutoWeb.syncCollections_Desktop()
|
|
786
|
+
.then(()=>{
|
|
787
|
+
do something.....
|
|
788
|
+
console.log('user', user);
|
|
789
|
+
})
|
|
790
|
+
}
|
|
791
|
+
},(error:any)=>{
|
|
792
|
+
console.log('error', error);
|
|
793
|
+
})
|
|
794
|
+
* @return Promise => rsp ={vcode, message, data(object)} / error
|
|
795
|
+
* vcode === 0: Designer logged in successfully
|
|
796
|
+
* vcode === 10: Developer logged in successfully
|
|
797
|
+
*/
|
|
798
|
+
onAuthStateChanged_AutoWeb_Developer(): Promise<unknown>;
|
|
772
799
|
signUpOwner_Sales365(email: string, password: string, phoneNumber: string, info: any): Promise<unknown> | null;
|
|
773
800
|
/**
|
|
774
801
|
* @example:
|
|
@@ -956,6 +983,30 @@ export declare class VhAuth {
|
|
|
956
983
|
* @return: null
|
|
957
984
|
*/
|
|
958
985
|
signOut(): Promise<any>;
|
|
986
|
+
/**
|
|
987
|
+
* @example:
|
|
988
|
+
* this.vhAuth.signOut_AutoWeb_Designer()
|
|
989
|
+
.then((res:any)=>{
|
|
990
|
+
console.log('res1', res);
|
|
991
|
+
},(error:any)=>{
|
|
992
|
+
console.log('error1', error);
|
|
993
|
+
})
|
|
994
|
+
* @notice : luôn luôn trả về null
|
|
995
|
+
* @return: null
|
|
996
|
+
*/
|
|
997
|
+
signOut_AutoWeb_Designer(): Promise<any>;
|
|
998
|
+
/**
|
|
999
|
+
* @example:
|
|
1000
|
+
* this.vhAuth.signOut_AutoWeb_Developer()
|
|
1001
|
+
.then((res:any)=>{
|
|
1002
|
+
console.log('res1', res);
|
|
1003
|
+
},(error:any)=>{
|
|
1004
|
+
console.log('error1', error);
|
|
1005
|
+
})
|
|
1006
|
+
* @notice : luôn luôn trả về null
|
|
1007
|
+
* @return: null
|
|
1008
|
+
*/
|
|
1009
|
+
signOut_AutoWeb_Developer(): Promise<any>;
|
|
959
1010
|
/**
|
|
960
1011
|
* @example:
|
|
961
1012
|
* this.vhAuth.resetPasswordbyEmail()
|
|
@@ -20393,6 +20444,120 @@ export declare class VhDevAutoWeb {
|
|
|
20393
20444
|
private vhMGDB_database;
|
|
20394
20445
|
private vhMGDB_image;
|
|
20395
20446
|
constructor(vhAlgorithm: VhAlgorithm, vhAuth: VhAuth, vhMGDB_auth: VhMGDB_auth, vhMGDB_rootdatabase: VhMGDB_rootdatabase, vhMGDB_pattern: VhMGDB_pattern, vhMGDB_database: VhMGDB_database, vhMGDB_image: VhMGDB_image);
|
|
20447
|
+
/**
|
|
20448
|
+
* @example:
|
|
20449
|
+
* this.vhDevAutoWeb.addPatternBlock({name:'Danh mục 1'})
|
|
20450
|
+
.then((block)=>{
|
|
20451
|
+
console.log('addPatternBlock', block);
|
|
20452
|
+
},(error:any)=>{
|
|
20453
|
+
console.log('error', error);
|
|
20454
|
+
})
|
|
20455
|
+
* @param data
|
|
20456
|
+
* @return Promise => rsp ={vcode, msg, data(object)} / error
|
|
20457
|
+
* vcode == 0: success
|
|
20458
|
+
* vcode == 11: 'not logged in'
|
|
20459
|
+
*/
|
|
20460
|
+
private addEmbeddingBlock;
|
|
20461
|
+
/**
|
|
20462
|
+
* @example:
|
|
20463
|
+
* this.vhDevAutoWeb.addEmbeddingBlock_byID('nvliw974854hf848ugrgh3498', {name:'camera 2', quantity:20, price:200000})
|
|
20464
|
+
.then((block)=>{
|
|
20465
|
+
console.log('addEmbeddingBlock_byID', block);
|
|
20466
|
+
}, error=>{
|
|
20467
|
+
console.log('error', error);
|
|
20468
|
+
})
|
|
20469
|
+
* @param colname
|
|
20470
|
+
* @param data
|
|
20471
|
+
* @return Promise => rsp ={vcode, msg, data(object)} / error
|
|
20472
|
+
* vcode == 0: success
|
|
20473
|
+
* vcode == 11: 'not logged in'
|
|
20474
|
+
*/
|
|
20475
|
+
addEmbeddingBlock_byID(_id: string, data: object): Promise<unknown>;
|
|
20476
|
+
/**
|
|
20477
|
+
* @example:
|
|
20478
|
+
* this.vhDevAutoWeb.updateEmbeddingBlock('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
20479
|
+
.then((bool:any)=>{
|
|
20480
|
+
console.log('updateEmbeddingBlock', bool);
|
|
20481
|
+
}, error=>{
|
|
20482
|
+
console.log('error', error);
|
|
20483
|
+
})
|
|
20484
|
+
* @param colname
|
|
20485
|
+
* @param _id
|
|
20486
|
+
* @param data
|
|
20487
|
+
* @return Promise => rsp ={vcode, msg, data(true/false)} / error
|
|
20488
|
+
* vcode == 0: success
|
|
20489
|
+
* vcode == 11: 'not logged in'
|
|
20490
|
+
*/
|
|
20491
|
+
updateEmbeddingBlock(id_doc: string, value: object): Promise<unknown>;
|
|
20492
|
+
/**
|
|
20493
|
+
* @example:
|
|
20494
|
+
* this.vhDevAutoWeb.deleteEmbeddingBlock('5fb67fda87c0f21d484cbdf3')
|
|
20495
|
+
.then(bool=>{
|
|
20496
|
+
console.log('deleteEmbeddingBlock', bool);
|
|
20497
|
+
})
|
|
20498
|
+
* @param colname
|
|
20499
|
+
* @param _id
|
|
20500
|
+
* @return Promise => rsp ={vcode, msg, data(true/false)} / error
|
|
20501
|
+
* vcode == 0: success
|
|
20502
|
+
* vcode == 11: 'not logged in'
|
|
20503
|
+
*/
|
|
20504
|
+
deleteEmbeddingBlock(id_doc: string): Promise<unknown>;
|
|
20505
|
+
/**
|
|
20506
|
+
* @example
|
|
20507
|
+
* this.vhDevAutoWeb.getEmbeddingBlock('5fb67fda87c0f21d484cbdf3')
|
|
20508
|
+
.then((product)=>{
|
|
20509
|
+
console.log('getEmbeddingBlock', product);
|
|
20510
|
+
},(error:any)=>{
|
|
20511
|
+
console.log('error', error);
|
|
20512
|
+
})
|
|
20513
|
+
* @param colname
|
|
20514
|
+
* @param _id
|
|
20515
|
+
* @return Promise => rsp ={vcode, msg, data(object)} / error
|
|
20516
|
+
* vcode == 0: success
|
|
20517
|
+
* vcode == 11: 'not logged in'
|
|
20518
|
+
*/
|
|
20519
|
+
getEmbeddingBlock(id_doc: string): Promise<unknown>;
|
|
20520
|
+
/**
|
|
20521
|
+
* @example:
|
|
20522
|
+
* this.vhDevAutoWeb.getPBlocksByFields({group_type:{$eq:10}}, {})
|
|
20523
|
+
.then((pblocks)=>{
|
|
20524
|
+
console.log('getPBlocksByFields', pblocks);
|
|
20525
|
+
},error=>{
|
|
20526
|
+
console.log('error', error);
|
|
20527
|
+
})
|
|
20528
|
+
* @param colname
|
|
20529
|
+
* @param query : {}
|
|
20530
|
+
* @param projection {} đang tìm hiểu
|
|
20531
|
+
* @param sort null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
20532
|
+
* @param limit null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
20533
|
+
* @return Promise => rsp ={vcode, msg, data(array)} / error
|
|
20534
|
+
* vcode == 0: success
|
|
20535
|
+
* vcode == 11: 'not logged in'
|
|
20536
|
+
*/
|
|
20537
|
+
private getEmbeddingBlocks_byFields;
|
|
20538
|
+
/**
|
|
20539
|
+
* @example:
|
|
20540
|
+
* this.vhDevAutoWeb.getEmbeddingBlocks_byFields_byPages('webapp_abouts', {name:{$eq:'name abc'}}, {},{},6,1)
|
|
20541
|
+
.then(response=>{
|
|
20542
|
+
console.log('response', response);
|
|
20543
|
+
if(response.vcode === 0){
|
|
20544
|
+
//-----------your code-----------
|
|
20545
|
+
let products = response.data;
|
|
20546
|
+
}
|
|
20547
|
+
},(error:any)=>{
|
|
20548
|
+
console.log('error', error)
|
|
20549
|
+
})
|
|
20550
|
+
* @param colname
|
|
20551
|
+
* @param query
|
|
20552
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
20553
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
20554
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
20555
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
20556
|
+
* @return Promise => rsp ={vcode, message, data(array), limit, page, totalpages} / error
|
|
20557
|
+
* vcode == 0: success
|
|
20558
|
+
* vcode == 11: 'not logged in'
|
|
20559
|
+
*/
|
|
20560
|
+
getEmbeddingBlocks_byFields_byPages(query: any, projection?: object, sort?: any, limit?: number, page?: number): Promise<unknown>;
|
|
20396
20561
|
/**
|
|
20397
20562
|
* @example:
|
|
20398
20563
|
* this.vhDevAutoWeb.addPatternBlock({name:'Danh mục 1'})
|
|
@@ -20613,6 +20778,54 @@ export declare class VhDevAutoWeb {
|
|
|
20613
20778
|
static ɵfac: i0.ɵɵFactoryDeclaration<VhDevAutoWeb, never>;
|
|
20614
20779
|
static ɵprov: i0.ɵɵInjectableDeclaration<VhDevAutoWeb>;
|
|
20615
20780
|
}
|
|
20781
|
+
export declare class VhEinvoice {
|
|
20782
|
+
private vhAlgorithm;
|
|
20783
|
+
private vhMGDB_auth;
|
|
20784
|
+
constructor(vhAlgorithm: VhAlgorithm, vhMGDB_auth: VhMGDB_auth);
|
|
20785
|
+
/**
|
|
20786
|
+
* Hàm đăng nhập vào M-invoice để lấy token
|
|
20787
|
+
* @example
|
|
20788
|
+
* this.vhEinvoice.signin_byMinvoice(taxcode, username, password)
|
|
20789
|
+
.then((data)=>{
|
|
20790
|
+
//-----------your code here-----------
|
|
20791
|
+
},(error:any)=>{
|
|
20792
|
+
console.log('error', error)
|
|
20793
|
+
})
|
|
20794
|
+
* @param taxcode
|
|
20795
|
+
* @param username
|
|
20796
|
+
* @param password
|
|
20797
|
+
* @returns Promise => obj
|
|
20798
|
+
* {"code": "00", "message": "Thành công", "ok": true, "token": "O87316arj5......."}
|
|
20799
|
+
* {"code": "99", "message": "Tên đăng nhập hoặc mật khẩu không đúng", "ok": false, "error": "Tên đăng nhập hoặc mật khẩu không đúng"}
|
|
20800
|
+
*/
|
|
20801
|
+
signin_byMinvoice(taxcode: string, username: string, password: string): Promise<any>;
|
|
20802
|
+
/**
|
|
20803
|
+
* Hàm lấy về danh sách các ký tự hóa đơn đẵ đăng ký với thuế
|
|
20804
|
+
* @example
|
|
20805
|
+
* this.vhEinvoice.getTypeInvoiceSeries_byMinvoice(taxcode, token, Type)
|
|
20806
|
+
.then(()=>{
|
|
20807
|
+
//-----------your code here-----------
|
|
20808
|
+
},(error:any)=>{
|
|
20809
|
+
console.log('error', error)
|
|
20810
|
+
})
|
|
20811
|
+
* @param taxcode
|
|
20812
|
+
* @param token
|
|
20813
|
+
* @param Type
|
|
20814
|
+
* Ý nghĩa Type:
|
|
20815
|
+
* 1: Hóa đơn giá trị gia tăng
|
|
20816
|
+
* 2: Hóa đơn bán hàng
|
|
20817
|
+
* 5: Tem vé thẻ
|
|
20818
|
+
* 6: Phiếu xuất kho (Kiêm vận chuyển nội bộ, gửi bán đại lý)
|
|
20819
|
+
* @returns Promise => obj
|
|
20820
|
+
* {"code": "00", "message": “Thành công”, "ok": true, "data": [{"id": "3a08d649-2284-2577-7b7d-91a284f25eb3", "quanlykyhieu68_id": "6252b95a-b64e-4ccf-b76b-ac812ae1efc0", "khhdon": "6C23NYY", "value": "6C23NYY", "invoiceForm": "6", "invoiceYear": 23, "number": null, "orders": null, "invoiceTypeName": "Phiếu xuất kho kiêm vận chuyển nội bộ"}]
|
|
20821
|
+
* {"code": "3", "message": "Token hết hạn hoặc không đúng vui lòng kiểm tra lại!", "error": "Token hết hạn hoặc không đúng vui lòng kiểm tra lại!", "ok": false}
|
|
20822
|
+
*/
|
|
20823
|
+
getTypeInvoiceSeries_byMinvoice(taxcode: string, token: string, Type?: number): Promise<any>;
|
|
20824
|
+
createBill_noSign_byMinvoice(taxcode: string, username: string, password: string): Promise<any>;
|
|
20825
|
+
createBill_Sign_byMinvoice(taxcode: string, username: string, password: string): void;
|
|
20826
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VhEinvoice, never>;
|
|
20827
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VhEinvoice>;
|
|
20828
|
+
}
|
|
20616
20829
|
export declare class VhDesignAutoWeb {
|
|
20617
20830
|
private vhAlgorithm;
|
|
20618
20831
|
private vhAuth;
|
|
@@ -25912,6 +26125,17 @@ export declare class VhQuerySales {
|
|
|
25912
26125
|
* @return Promise => bool = true or false
|
|
25913
26126
|
*/
|
|
25914
26127
|
deleteBill_Detail(id_bill_detail: any): Promise<unknown>;
|
|
26128
|
+
/**
|
|
26129
|
+
* Hàm này chỉ áp dụng cho bill_type 1,5 và bill_detail có ptype 5
|
|
26130
|
+
* @example:
|
|
26131
|
+
* this.vhQuerySales.deleteBill_Detail_ptype_5('5fb67fda87c0f21d484cbdf3')
|
|
26132
|
+
.then((bool:any)=>{
|
|
26133
|
+
console.log('deleteBill_Detail', bool);
|
|
26134
|
+
})
|
|
26135
|
+
* @param id_bill_detail
|
|
26136
|
+
* @return Promise => bool = true or false
|
|
26137
|
+
*/
|
|
26138
|
+
deleteBill_Detail_ptype_5(id_bill_detail: any): Promise<unknown>;
|
|
25915
26139
|
/**
|
|
25916
26140
|
* hàm này chỉ dùng cho trường hợp chuyển trạng thái (bill_type) của biên nhận bảo hành (chưa xử lý 18, đang xử lý 19, hoàn thành 20, đã giao khách 21)
|
|
25917
26141
|
* @example
|