Changed Age to Date of Birth
authorHarishankar <v.harishankar@gmail.com>
Wed, 24 Oct 2018 16:39:57 +0000 (22:09 +0530)
committerHarishankar <v.harishankar@gmail.com>
Wed, 24 Oct 2018 16:39:57 +0000 (22:09 +0530)
Changed age to Date of birth in the resume.

bindata.go
resources/resumebuilder.glade
resumebuilder.go

index fcf0be7..b9ccd69 100644 (file)
@@ -68,7 +68,7 @@ func (fi bindataFileInfo) Sys() interface{} {
        return nil
 }
 
-var _resourcesResumebuilderGlade = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x5f\x6f\xdb\x36\x10\x7f\xcf\xa7\xe0\xf8\x3a\x38\x8e\xa5\xb9\x4d\x01\x49\x45\xbb\xd5\x7d\xe9\x3a\x60\xee\xb0\x47\x83\x26\x2f\x12\x67\x86\xd4\x48\xca\x7f\xbe\xfd\x40\x3b\x69\x6c\xeb\x4f\x24\x39\x56\x54\xcc\x2f\x41\x2c\xde\x9d\x8e\xf7\xbb\xdf\x1d\x4f\x52\xf0\x7e\x7d\x2f\xd0\x12\xb4\xe1\x4a\x86\x78\x74\x7d\x83\x11\x48\xaa\x18\x97\x71\x88\xff\xfa\x36\x19\xdc\xe2\xf7\xd1\x55\xf0\xd3\x60\x80\x3e\x83\x04\x4d\x2c\x30\xb4\xe2\x36\x41\xb1\x20\x0c\x90\x7f\xed\x79\xd7\x23\x34\x18\x44\x57\x01\x97\x16\xf4\x1d\xa1\x10\x5d\x21\x14\x68\xf8\x37\xe3\x1a\x0c\x12\x7c\x1e\xe2\xd8\x2e\x7e\xc6\x4f\x37\xf2\xaf\xbd\x1b\x3c\xdc\xca\xa9\xf9\x3f\x40\x2d\xa2\x82\x18\x13\xe2\xcf\x76\xf1\x37\x97\x4c\xad\x30\xe2\x2c\xc4\xbf\x13\x2e\x1f\x7e\x3b\x61\x84\x82\x54\xab\x14\xb4\xdd\x20\x49\xee\x21\xc4\xee\x2f\x8e\x9e\xc4\x82\xe1\xa3\x40\xb1\x3c\x25\x72\x76\xa7\x68\x66\x70\x34\x21\xc2\xc0\x73\xf2\xab\xad\xd5\x59\xaa\x0c\xb7\x5c\x49\x1c\x51\x70\xbb\x1c\x28\x39\x48\x89\x06\x69\x73\x06\x68\xc2\x05\xdb\xfd\xef\xcc\x09\x42\x21\x51\x82\x81\x1e\x3e\x08\x0c\xf7\x24\x8e\xa4\x73\xb1\xf8\xaa\x2c\xcc\x95\x5a\xe0\x47\x91\xbc\x87\x4b\x6e\xf8\x5c\x00\x8e\xbe\xe9\x2c\xb7\x9d\x67\x42\x50\xaa\x72\xe0\x56\xb1\x6b\x13\xbe\x06\x86\xf7\x65\x5a\xf8\xd6\x06\xa2\x72\x27\x8b\x1d\xfd\x24\xad\xde\xec\xd2\x69\xc2\xb5\xb1\x5f\xb7\x29\x73\xa4\x56\x84\x3c\xb3\xc9\xcc\x65\x31\x18\x8b\x23\xcf\x1b\x97\x39\xd2\x7a\xe7\x2d\xd1\x29\x53\xe5\x32\xcd\xec\x2c\xcd\x74\xaa\x0c\xe0\xc8\x5d\x2c\x57\x0f\x86\xbb\x40\xe5\xae\xa7\x84\x2e\xb8\x8c\x9f\xbf\xdd\xda\x05\x65\xd4\xc4\xc1\x0d\x8e\x46\x15\x0a\xc1\xb0\xf0\xde\x07\x84\xf9\x7e\xb1\x26\xf8\x5f\xc8\x1c\x44\x0d\xb4\x5f\x02\xaf\xca\x6c\x2d\xd2\x15\x5b\xe7\x90\xd5\x44\x1a\x41\x2c\x99\x0b\x17\x24\x70\xa6\x5c\xa2\xa2\x0e\x10\xf4\xdf\x36\x05\xf0\xf6\x02\x60\x0d\x00\xbf\x90\x9e\xe2\x37\xae\x50\x38\x07\x7e\x7b\xd5\xd7\xc5\xe4\x52\x7c\xd1\xeb\x15\xdf\xf1\xcd\x85\xbb\x35\xb8\x3b\x85\x75\xdf\x58\x3b\xf2\xbd\x6e\xa1\xfb\x93\x30\xae\x3e\x66\xd6\x2a\xf9\x78\x12\x17\x75\x88\x5b\x1e\x55\x67\xa0\xc9\xae\x8f\x4a\xc0\xf8\x5d\x13\xe5\x04\x78\x9c\xd8\xbd\x02\xf2\x4b\xdf\xeb\x87\x06\x0a\x7c\x09\x66\xc6\xe0\x8e\x64\xc2\xb6\xc8\x68\x42\x2d\x5f\xb6\xf0\x9a\x69\xb2\x9a\x71\xc9\x38\x25\x56\xe9\x1a\xfa\x86\xc7\x92\x88\x07\x6d\xab\xe2\x58\x00\xc3\x28\x21\x92\x09\xd0\x21\x9e\xc2\xda\x81\x3d\x05\x01\xd4\xba\x15\xb3\x22\x69\x0a\x2c\xc4\x52\xe1\xe1\x59\x08\x35\x1a\x37\x3e\x88\xfa\x1d\x9f\x44\x73\x8c\x9a\xc0\xfd\xa9\x9c\xda\x99\x38\x81\x55\x6f\x1b\xf5\xd5\x0b\xab\xce\xc9\xaa\x23\xfd\x58\xab\x2c\xad\x51\x36\x9f\x27\xe3\x2e\x4b\xba\xa4\xa3\xe7\x55\xb4\xab\xfe\xd1\xf1\x14\x0a\xfe\x61\x13\xd0\x27\x30\xf0\xcd\x69\x0c\xec\xfd\xb9\xf8\xc2\xc0\x29\xac\xb7\x49\xd2\x25\x01\xfd\x1b\xbf\xef\x04\xfc\x41\x87\x83\x0f\x71\xef\x46\xfa\x77\xaf\x37\xd2\x7f\x88\x5b\x4c\xf3\x55\x63\x68\x3f\x8a\xd6\xd1\x30\xcf\x78\xcc\xad\x39\xfb\x38\xdf\x28\x2c\x1b\x1c\xdd\x56\x8c\x44\xe7\xc0\x7d\xff\xf0\x3a\x25\x4b\x78\x81\xee\xe9\xcc\x9c\xd0\x3c\x47\x7e\xa3\x98\x1d\x77\x4f\xff\x07\x3c\xbf\x36\x1b\xce\xa8\xe0\x74\x71\xd8\x8d\xbe\x03\xf7\xeb\xe3\x5a\x17\xed\xa8\xf1\x03\x8f\x37\x2f\xf2\x9c\xb9\xc8\xfb\x62\xcf\x8f\x7d\xb0\x64\x3e\xbb\xe3\x42\x54\x36\x8f\x02\x47\x72\x4e\xec\xd8\x85\xec\x26\xdd\x59\x3d\xe0\x4b\xbd\xb6\xd8\xed\x6b\xb5\xda\xe4\xfd\x48\x0c\xa7\xe8\x37\xb0\x84\x8b\x92\xea\xd8\x9b\xf8\x57\x07\xfd\x95\xdf\x65\xb6\x8f\xd2\xd3\x7b\xe9\x92\xd3\xdb\xff\x3b\x43\x3f\xb1\x8c\x12\x17\x9f\xce\xe3\xde\x6d\x42\xe7\xbf\x32\x68\x01\x74\x2d\x23\x87\x21\xdb\x5b\x7c\x5a\x08\x86\x7b\x1f\x82\xfc\x17\x00\x00\xff\xff\x03\x43\x0c\x05\x61\x22\x00\x00")
+var _resourcesResumebuilderGlade = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x4b\x6f\xdb\x38\x10\xbe\xe7\x57\x70\x79\x5d\x38\x7e\x6d\xda\x04\xb0\x55\x20\x4d\xdd\x4b\xb7\x05\x36\x5d\xec\xd1\x18\x93\x63\x89\x6b\x86\xd4\x92\x94\x1f\xff\x7e\x41\x3b\x0f\x3f\x24\x59\x92\x63\xd9\x41\x73\x09\x62\x69\x66\x34\x9c\xef\xfb\x86\x0f\xa9\xf7\x69\xfe\x20\xc9\x14\x8d\x15\x5a\xf5\x69\xfb\xb2\x45\x09\x2a\xa6\xb9\x50\x61\x9f\xfe\xfd\x73\xd0\xb8\xa6\x9f\x82\x8b\xde\x6f\x8d\x06\xf9\x8a\x0a\x0d\x38\xe4\x64\x26\x5c\x44\x42\x09\x1c\x49\xf7\xb2\xd3\xb9\x6c\x93\x46\x23\xb8\xe8\x09\xe5\xd0\x8c\x81\x61\x70\x41\x48\xcf\xe0\x7f\x89\x30\x68\x89\x14\xa3\x3e\x0d\xdd\xe4\x77\xfa\xf2\xa0\xee\x65\xa7\x45\x9b\x4b\x3b\x3d\xfa\x17\x99\x23\x4c\x82\xb5\x7d\xfa\xd5\x4d\xfe\x11\x8a\xeb\x19\x25\x82\xf7\xe9\x9f\x20\xd4\xe3\x6f\x6f\x4c\x48\x2f\x36\x3a\x46\xe3\x16\x44\xc1\x03\xf6\xa9\xff\x4b\x83\x17\xb3\x5e\xf3\xc9\x20\xdd\x9e\x81\x1a\x8e\x35\x4b\x2c\x0d\x06\x20\x2d\xee\xb3\x9f\x2d\xa3\x0e\x63\x6d\x85\x13\x5a\xd1\x80\xa1\x1f\x65\x43\xab\x46\x0c\x06\x95\xdb\x09\xc0\x22\x21\xf9\xea\x7f\x1f\x4e\x02\xc3\x48\x4b\x8e\xa6\xf9\x68\xd0\x5c\xb3\xd8\xb2\xde\xa9\xc5\x77\xed\x70\xa4\xf5\x84\x3e\x99\xec\x66\x38\x15\x56\x8c\x24\xd2\xe0\xa7\x49\x76\x86\xb3\xa7\x04\x99\x2e\x1b\x69\xa5\xa7\x36\x10\x73\xe4\x74\xdd\xa6\x42\x6e\x55\x20\xca\x4e\x32\x3d\xd1\x2f\xca\x99\xc5\x8a\x4e\x03\x61\xac\xfb\xbe\xa4\xcc\x96\x5b\x1a\xf2\xdc\x45\x43\xcf\x62\xb4\x8e\x06\x9d\xce\x55\x56\x22\x95\x47\x5e\x11\x9d\x2c\x57\xa1\xe2\xc4\x0d\xe3\xc4\xc4\xda\x22\x0d\xfc\xc5\x6c\xf7\x5e\x73\x55\xa8\x9d\xeb\x31\xb0\x89\x50\xe1\xfe\xc7\xcd\x7d\x51\xda\x65\x12\x5c\xd0\xa0\x9d\xe3\xd0\x6b\xa6\x3e\x7b\x43\x30\xcf\x17\x0b\x82\xff\x0d\x46\x28\x0b\xa0\xfd\x1a\x78\xe5\xb2\x35\xcd\x57\x2e\x93\x23\xce\x80\xb2\x12\x1c\x8c\xa4\x2f\x12\xfa\x50\x9e\xa8\xa4\x06\x04\xbb\x1f\xcb\x02\x78\xfd\x0e\x60\x01\x00\xbf\xc1\x99\xe2\x77\x95\xe3\x70\x0c\xfc\xd6\xba\xaf\xaf\xc9\x7b\xf3\x25\xa7\x6b\xbe\x57\xad\xf3\xd4\xee\x36\xda\x7f\x94\x19\x57\x84\x22\x8c\xdc\x9a\x77\xce\x20\xcf\xbe\x6d\xdc\xe3\xfc\xdc\x1a\x46\xe7\x3a\x07\x8e\x63\xb0\xe6\x2f\xe0\x42\xdf\x26\xce\x69\xf5\xb4\x09\x90\x45\x7a\x46\x76\x55\x7d\x80\x32\xa3\xde\xe2\xe3\xd5\xcd\x41\x7c\x2c\xc5\xe6\x53\xb4\x2e\x83\x0c\xc5\x14\xed\x90\xe3\x18\x12\xe9\x2a\x30\x1a\x98\x13\xd3\x0a\x59\x73\x03\xb3\xa1\x50\x5c\x30\x70\xda\x14\xf0\xb7\x22\x54\x20\x1f\xbd\x9d\x0e\x43\x89\x9c\x92\x08\x14\x97\x68\xfa\xf4\x1e\xe7\x1e\xec\x7b\x94\xc8\x9c\xbf\x63\x67\x10\xc7\xc8\xfb\x54\x69\xda\x3c\x52\x1b\xce\x59\x11\x65\x28\xaa\x73\x62\x45\x0d\xf0\xe1\x50\x4d\xad\x42\x1c\xa0\xaa\x8f\xa5\xa6\xf4\x77\x55\x1d\x53\x55\x5b\xfe\xa1\xd1\x49\x5c\xa0\x6d\xee\x17\xe3\x8a\x25\x75\xca\xb1\xdb\x2a\xc5\xab\x53\xcb\xf1\x10\x09\xfe\x70\x11\x9a\x03\x14\xf8\xe1\x30\x05\x7e\x78\x57\x60\xa6\xdf\xf9\x28\x70\x49\x92\x5a\x05\x78\x93\x23\xa7\xf3\x10\xe0\x1b\x3d\x53\xb8\x03\x87\x44\x8f\xc9\xad\x30\x2e\x3a\xb7\x6d\xc2\x4d\xcd\xe7\x0a\xeb\xcb\x99\x7b\x98\xe2\x2b\xf4\x53\x1f\xe6\x80\x76\xda\xee\x96\xda\x79\x6e\xf7\xd3\xee\x1b\x5c\xd1\x94\x5b\xae\x33\x29\xd8\x64\xb3\x3f\x3d\x03\xf7\xf9\xe9\x5e\x0d\x0d\xaa\x53\x96\xdb\xb9\x1e\xc7\x20\xf7\x67\x90\xa8\x38\x98\x15\xbd\xbd\xee\x7f\x8c\x97\xaa\xaf\x70\x98\x92\x77\x60\xbb\x9f\x95\xed\xeb\xda\x8f\x53\xca\xba\x2e\x10\x0c\x0d\x3a\xad\x72\x03\x7d\xd0\xca\x97\xb3\xd4\xd6\x9e\xc3\x62\xef\xce\x63\x83\xf1\x1c\x16\x0d\xfb\x3c\xf7\x3e\xd3\xfe\x4e\xdf\xd6\xbb\x43\x2d\xd5\x5a\x7c\x33\x7f\x95\x23\x9f\xb4\xe4\xd3\x13\xdf\x4e\xc1\xc1\x68\x38\x16\x52\xe6\x4e\x9f\x29\x89\xec\x24\xb1\x12\x1c\x71\x8b\x78\x15\x75\x43\x3f\xc5\x16\x06\xf5\xbe\xd3\x2c\x3c\x59\xdd\x82\x15\x8c\xdc\xa1\x03\x21\x6d\x56\x81\xce\xa4\xfe\xf9\x45\x3f\xf1\x8b\xe4\xea\x55\x7a\xf9\x28\x20\xe3\x20\xfe\xd7\x66\xe8\x17\x9e\x30\xf0\xf5\xa9\xbd\xee\xf5\x12\x7a\xf7\x13\x8f\x0a\x40\x17\x0a\xb2\x59\xb2\xb5\x9b\x2f\x37\x7a\xcd\xb5\xaf\x70\xfe\x0f\x00\x00\xff\xff\xd9\xef\xb0\x57\xde\x23\x00\x00")
 
 func resourcesResumebuilderGladeBytes() ([]byte, error) {
        return bindataRead(
@@ -83,7 +83,7 @@ func resourcesResumebuilderGlade() (*asset, error) {
                return nil, err
        }
 
-       info := bindataFileInfo{name: "resources/resumebuilder.glade", size: 8801, mode: os.FileMode(436), modTime: time.Unix(1540395646, 0)}
+       info := bindataFileInfo{name: "resources/resumebuilder.glade", size: 9182, mode: os.FileMode(436), modTime: time.Unix(1540399023, 0)}
        a := &asset{bytes: bytes, info: info}
        return a, nil
 }
index 049fb00..090844a 100644 (file)
             </child>
             <child>
               <object class="GtkLabel">
+                <property name="width_request">24</property>
+                <property name="height_request">20</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Sex</property>
               </object>
               <packing>
                 <property name="x">37</property>
-                <property name="y">132</property>
+                <property name="y">284</property>
               </packing>
             </child>
             <child>
@@ -87,8 +89,8 @@
                 <signal name="toggled" handler="SexMaleSelected" swapped="no"/>
               </object>
               <packing>
-                <property name="x">151</property>
-                <property name="y">131</property>
+                <property name="x">228</property>
+                <property name="y">282</property>
               </packing>
             </child>
             <child>
                 <signal name="toggled" handler="SexFemaleSelected" swapped="no"/>
               </object>
               <packing>
-                <property name="x">222</property>
-                <property name="y">131</property>
+                <property name="x">305</property>
+                <property name="y">282</property>
               </packing>
             </child>
             <child>
               <object class="GtkRadioButton">
                 <property name="label" translatable="yes">Other</property>
                 <property name="width_request">65</property>
-                <property name="height_request">25</property>
+                <property name="height_request">26</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <signal name="toggled" handler="SexOtherSelected" swapped="no"/>
               </object>
               <packing>
-                <property name="x">303</property>
-                <property name="y">131</property>
+                <property name="x">392</property>
+                <property name="y">282</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Age</property>
+                <property name="label" translatable="yes">Date of Birth</property>
               </object>
               <packing>
                 <property name="x">37</property>
               </packing>
             </child>
             <child>
-              <object class="GtkEntry" id="Age">
-                <property name="width_request">50</property>
+              <object class="GtkButton" id="SaveButton">
+                <property name="label" translatable="yes">Save</property>
+                <property name="width_request">130</property>
+                <property name="height_request">34</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="input_purpose">digits</property>
+                <property name="receives_default">True</property>
+                <signal name="clicked" handler="SaveButtonClicked" swapped="no"/>
               </object>
               <packing>
-                <property name="x">220</property>
-                <property name="y">89</property>
+                <property name="x">327</property>
+                <property name="y">327</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="SaveButton">
-                <property name="label" translatable="yes">Save</property>
-                <property name="width_request">130</property>
-                <property name="height_request">34</property>
+              <object class="GtkCalendar" id="DateOfBirth">
+                <property name="width_request">218</property>
+                <property name="height_request">180</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <signal name="clicked" handler="SaveButtonClicked" swapped="no"/>
+                <property name="year">2018</property>
+                <property name="month">9</property>
+                <property name="day">24</property>
+                <signal name="day-selected" handler="DoBSelected" swapped="no"/>
               </object>
               <packing>
-                <property name="x">307</property>
-                <property name="y">168</property>
+                <property name="x">224</property>
+                <property name="y">94</property>
               </packing>
             </child>
           </object>
index 09057c6..5e86a78 100644 (file)
@@ -3,17 +3,22 @@ package main
 import (
        "fmt"
        "os"
-       "strconv"
 
        "github.com/gotk3/gotk3/gtk"
 )
 
 type Applicant struct {
-       FirstName string
-       LastName  string
-       Age       int
-       Sex       Sex
-       Education []Education
+       FirstName   string
+       LastName    string
+       DateOfBirth Date
+       Sex         Sex
+       Education   []Education
+}
+
+type Date struct {
+       Year  uint
+       Month uint
+       Day   uint
 }
 
 type Education struct {
@@ -26,6 +31,7 @@ type Sex int
 
 var ui *gtk.Builder
 var selectedsex Sex
+var selecteddate Date
 
 const (
        Male   Sex = 1
@@ -74,22 +80,6 @@ func getBasicDetails() (*Applicant, error) {
                return nil, err
        }
 
-       obj, err = ui.GetObject("Age")
-       if err != nil {
-               return nil, err
-       }
-       agectl, ok := obj.(*gtk.Entry)
-       if !ok {
-               return nil, err
-       }
-       agetxt, err := agectl.GetText()
-       if err != nil {
-               return nil, err
-       }
-       age, err := strconv.Atoi(agetxt)
-       if err != nil {
-               return nil, err
-       }
        obj, err = ui.GetObject("Male")
        if err != nil {
                return nil, err
@@ -100,7 +90,7 @@ func getBasicDetails() (*Applicant, error) {
 
        applicant.FirstName = firstname
        applicant.LastName = lastname
-       applicant.Age = age
+       applicant.DateOfBirth = selecteddate
        applicant.Sex = selectedsex
 
        return applicant, nil
@@ -148,7 +138,7 @@ func LoadMain() {
        ui.AddFromString(string(asset))
        ui.ConnectSignals(map[string]interface{}{"SexMaleSelected": sexMaleSelected,
                "SexFemaleSelected": sexFemaleSelected, "SexOtherSelected": sexOtherSelected,
-               "SaveButtonClicked": SaveButtonClicked})
+               "SaveButtonClicked": SaveButtonClicked, "DoBSelected": doBSelected})
 
        wnd, err := getWindow()
        if err != nil {
@@ -183,6 +173,10 @@ func sexOtherSelected(other *gtk.RadioButton) {
        }
 }
 
+func doBSelected(dob *gtk.Calendar) {
+       selecteddate.Year, selecteddate.Month, selecteddate.Day = dob.GetDate()
+}
+
 func SaveButtonClicked() {
        a, err := getBasicDetails()
        if err != nil {