diff --git a/popup/src/components/mocks/main.vue b/popup/src/components/mocks/main.vue
new file mode 100644
index 0000000..bfbb7d7
--- /dev/null
+++ b/popup/src/components/mocks/main.vue
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/popup/src/components/mocks/script.ts b/popup/src/components/mocks/script.ts
new file mode 100644
index 0000000..657a113
--- /dev/null
+++ b/popup/src/components/mocks/script.ts
@@ -0,0 +1,17 @@
+import { Component, Prop, Vue } from 'vue-property-decorator'
+import VueClipboard from 'vue-clipboard2'
+import { Registers } from '@/classes/DTO/Registers'
+
+Vue.use(VueClipboard)
+
+@Component
+export default class Mocks extends Vue {
+ @Prop()
+ personalId!: string
+
+ registers = new Registers()
+
+ mounted () {
+ console.log('mounted')
+ }
+}
diff --git a/popup/src/components/mocks/style.scss b/popup/src/components/mocks/style.scss
new file mode 100644
index 0000000..e8608be
--- /dev/null
+++ b/popup/src/components/mocks/style.scss
@@ -0,0 +1,3 @@
+.option-select {
+ width: 350px;
+}
diff --git a/popup/src/components/mocks/template.html b/popup/src/components/mocks/template.html
new file mode 100644
index 0000000..91963f7
--- /dev/null
+++ b/popup/src/components/mocks/template.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/popup/src/components/person-tab/main.vue b/popup/src/components/person-tab/main.vue
new file mode 100644
index 0000000..bfbb7d7
--- /dev/null
+++ b/popup/src/components/person-tab/main.vue
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/popup/src/components/person-tab/script.ts b/popup/src/components/person-tab/script.ts
new file mode 100644
index 0000000..13b6a16
--- /dev/null
+++ b/popup/src/components/person-tab/script.ts
@@ -0,0 +1,115 @@
+import { Component, Vue } from 'vue-property-decorator'
+import personalIdGenerator from '@/classes/Service/Generators/PersonalIdGenerator'
+import ibanGenerator from '@/classes/Service/Generators/IbanGenerator'
+import phoneGenerator from '@/classes/Service/Generators/PhoneGenerator'
+import firstNameGenerator from '@/classes/Service/Generators/FirstNameGenerator'
+import lastNameGenerator from '@/classes/Service/Generators/LastNameGenerator'
+import { Person } from '@/classes/DTO/Person'
+import VueClipboard from 'vue-clipboard2'
+import { Target } from '@/classes/Enum/Target'
+import sender from '@/classes/Service/Browser/Chrome/Sender'
+import { Action } from '@/classes/Enum/Action'
+import notificationCleaner from '@/classes/Service/NotificationCleaner'
+import { Registers } from '@/classes/DTO/Registers'
+import Mocks from '@/components/mocks/main.vue'
+
+Vue.use(VueClipboard)
+
+@Component({
+ components: {
+ Mocks
+ }
+})
+export default class PersonTab extends Vue {
+ personalId = ''
+ person = new Person()
+ registers = new Registers()
+ isAutoCleaner = false
+ copyText = ''
+
+ get allowedMonths () {
+ const result = []
+ for (let i = 1; i <= 12; i++) {
+ result.push(i)
+ }
+ return result
+ }
+
+ get allowedYears () {
+ const result = []
+ const currentYear = (new Date()).getFullYear()
+ for (let i = 1960; i <= currentYear; i++) {
+ result.push(i)
+ }
+ return result
+ }
+
+ mounted () {
+ /** todo заполнить первоначальное значение */
+ notificationCleaner.state().then((isAutoCleaner) => {
+ this.isAutoCleaner = isAutoCleaner
+ console.log('this.isAutoCleaner = ' + isAutoCleaner)
+ })
+ }
+
+ copyPersonalId () {
+ const personalId = personalIdGenerator.generate(this.person)
+ this.personalId = personalId
+ this.copy(personalId)
+ }
+
+ copyIban () {
+ const iban = ibanGenerator.generate(this.person.country)
+ this.copy(iban)
+ }
+
+ copyPhone () {
+ const phone = phoneGenerator.generate(this.person.country)
+ this.copy(phone)
+ }
+
+ copy (text: string) {
+ this.copyText = text
+ this.$copyText(text)
+ }
+
+ autocomplete () {
+ const personalId = personalIdGenerator.generate(this.person)
+ this.insertValueToNode(Target.PERSONAL_ID, personalId)
+ const iban = ibanGenerator.generate(this.person.country)
+ this.insertValueToNode(Target.IBAN, iban)
+ const phone = phoneGenerator.generate(this.person.country)
+ this.insertValueToNode(Target.PHONE, phone)
+ const firstName = firstNameGenerator.generate(this.person.country, this.person.gender)
+ this.insertValueToNode(Target.FIRST_NAME, firstName)
+ const lastName = lastNameGenerator.generate(this.person.country)
+ this.insertValueToNode(Target.LAST_NAME, lastName)
+ }
+
+ insertValueToNode (target: Target, value: string): void {
+ sender.send({
+ action: Action.INSERT,
+ target: target,
+ value: value
+ })
+ }
+
+ cleanNotifications (): void {
+ sender.send({
+ action: Action.CLEAN_NOTIFICATION
+ })
+ }
+
+ onChangeAutoCleaner () {
+ console.log(this.isAutoCleaner)
+ if (this.isAutoCleaner) {
+ notificationCleaner.enable()
+ } else {
+ notificationCleaner.disable()
+ }
+ }
+
+ saveMocks () {
+ console.log(this.personalId, this.registers)
+ }
+}
diff --git a/popup/src/components/person-tab/style.scss b/popup/src/components/person-tab/style.scss
new file mode 100644
index 0000000..e8608be
--- /dev/null
+++ b/popup/src/components/person-tab/style.scss
@@ -0,0 +1,3 @@
+.option-select {
+ width: 350px;
+}
diff --git a/popup/src/components/person-tab/template.html b/popup/src/components/person-tab/template.html
new file mode 100644
index 0000000..5ad780e
--- /dev/null
+++ b/popup/src/components/person-tab/template.html
@@ -0,0 +1,61 @@
+
+
+
+
+
Memory: {{copyText}}
+
diff --git a/popup/src/components/script.ts b/popup/src/components/script.ts
index e91f416..78afb08 100644
--- a/popup/src/components/script.ts
+++ b/popup/src/components/script.ts
@@ -11,10 +11,15 @@ import sender from '@/classes/Service/Browser/Chrome/Sender'
import { Action } from '@/classes/Enum/Action'
import notificationCleaner from '@/classes/Service/NotificationCleaner'
import { Registers } from '@/classes/DTO/Registers'
+import Mocks from '@/components/mocks/main.vue'
Vue.use(VueClipboard)
-@Component
+@Component({
+ components: {
+ Mocks
+ }
+})
export default class HelloWorld extends Vue {
tab = 'person'
personalId = ''
@@ -71,6 +76,8 @@ export default class HelloWorld extends Vue {
autocomplete () {
const personalId = personalIdGenerator.generate(this.person)
+ this.personalId = personalId
+ this.copy(personalId)
this.insertValueToNode(Target.PERSONAL_ID, personalId)
const iban = ibanGenerator.generate(this.person.country)
this.insertValueToNode(Target.IBAN, iban)
diff --git a/popup/src/components/template.html b/popup/src/components/template.html
index c98866f..c78083f 100644
--- a/popup/src/components/template.html
+++ b/popup/src/components/template.html
@@ -72,6 +72,20 @@
Memory: {{copyText}}
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-