classcard-ui 0.2.186 → 0.2.190

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.186",
3
+ "version": "0.2.190",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -287,6 +287,7 @@ export default {
287
287
  showLoader: this.isLoading,
288
288
  searchTerm: "",
289
289
  paginationRecords: this.paginationData,
290
+ reorderedArray: [...this.rows],
290
291
  };
291
292
  },
292
293
  methods: {
@@ -299,23 +300,15 @@ export default {
299
300
  },
300
301
  // array of rows after drag and drop
301
302
  rearrange(oldIndex, newIndex) {
302
- var reorderedArray = [];
303
- this.rows.forEach(function (row) {
304
- reorderedArray.push({ oldID: row.id });
305
- });
306
- const movedItem = this.rows.find((item, index) => index === oldIndex);
307
- const remainingItems = this.rows.filter((item, index) => index !== oldIndex);
308
-
303
+ const movedItem = this.reorderedArray.find((item, index) => index === oldIndex);
304
+ const remainingItems = this.reorderedArray.filter((item, index) => index !== oldIndex);
309
305
  const reorderedItems = [
310
306
  ...remainingItems.slice(0, newIndex),
311
307
  movedItem,
312
308
  ...remainingItems.slice(newIndex),
313
309
  ];
314
- reorderedItems.forEach(function (row, index) {
315
- reorderedArray[index].newID = row.id;
316
- });
317
- this.$emit('reordered', reorderedArray);
318
- return reorderedArray;
310
+ this.reorderedArray = [...reorderedItems];
311
+ this.$emit('reordered', this.reorderedArray);
319
312
  },
320
313
  // listing functions
321
314
  sortChange(params) {
package/src/icons.js CHANGED
@@ -99,6 +99,7 @@ export default {
99
99
  'globe-alt-solid' : 'M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z',
100
100
  'x-circle-solid': 'M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z',
101
101
  'x-circle-outline': 'M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z',
102
- 'check-circle-outline':'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'
102
+ 'check-circle-outline':'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z',
103
+ 'play-solid':'M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z'
103
104
 
104
105
  }
@@ -29,18 +29,14 @@ export const Default = Template.bind({});
29
29
  Default.args = {
30
30
  cols: [
31
31
  { label: "", field: "drag", hidden: false },
32
+ { label: "Payment mode", field: "mode", hidden: false },
32
33
  {
33
- label: "Make",
34
- field: "make",
34
+ label: "",
35
+ field: "menuOptions",
35
36
  hidden: false,
36
- sortable: true,
37
- direction: null,
38
- },
39
- { label: "Model", field: "modal", hidden: false, sortable: true, direction: null },
40
- { label: "Staff", field: "staff", hidden: false },
41
- { label: "CRR", field: "crr", hidden: false, sortable: true, direction: null, type: "decimal" },
42
- { label: "Switch", field: "switch", hidden: false },
43
- { label: "Icon", field: "color", hidden: false },
37
+ customizeColumn: true,
38
+ width: "60px"
39
+ }
44
40
  ],
45
41
  showHideColumnList: [
46
42
  { label: "", field: "drag", hidden: false },
@@ -68,50 +64,7 @@ Default.args = {
68
64
  { label: "Switch", field: "switch", hidden: false },
69
65
  { label: "Icon", field: "color", hidden: false },
70
66
  ],
71
- rows: [
72
- {
73
- type: "",
74
- id: 1,
75
- make: "Baleno",
76
- modal: "Fusion",
77
- switch: "",
78
- staff: {
79
- image:
80
- "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
81
- name: "Manager",
82
- },
83
- crr: "0.00",
84
- color: { name: "trash", type: "solid", class: "h-5 w-5" },
85
- },
86
- {
87
- type: "",
88
- id: 2,
89
- make: "Test",
90
- modal: "Cruz",
91
- switch: "",
92
- staff: {
93
- image:
94
- "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
95
- name: "Manager",
96
- },
97
- crr: "9.56",
98
- color: { name: "trash", type: "solid", class: "h-5 w-5" },
99
- },
100
- {
101
- type: "",
102
- id: 3,
103
- make: "Honda City",
104
- modal: "Maruti",
105
- switch: "",
106
- staff: {
107
- image:
108
- "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80",
109
- name: "Manager",
110
- },
111
- crr: "3.28",
112
- color: { name: "trash", type: "solid", class: "h-5 w-5" },
113
- },
114
- ],
67
+ rows: [{"id":5,"mode":"ATM Machine 1","sort_order":2,"status":1,"rcInstitutionID":82,"created_at":"2020-09-02T12:53:09.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":11,"mode":"QA 1","sort_order":3,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:57:47.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":7,"mode":"ATM Machine 2","sort_order":4,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:45:47.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":18,"mode":"QA 3","sort_order":8,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T10:05:15.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":12,"mode":"QA 2","sort_order":21,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T09:57:55.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":15,"mode":"QA 4","sort_order":22,"status":1,"rcInstitutionID":82,"created_at":"2020-09-04T10:00:23.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":162,"mode":"Yes bank","sort_order":62,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:22:43.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":163,"mode":"SBI bank","sort_order":63,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:33:17.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":164,"mode":"BOB bank","sort_order":64,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:35:12.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"},{"id":165,"mode":"PNB bank","sort_order":65,"status":1,"rcInstitutionID":82,"created_at":"2020-11-18T09:55:16.000000Z","updated_at":"2021-11-25T13:13:56.000000Z"}],
115
68
  pagination: true,
116
69
  sorting: false,
117
70
  searching: true,