Ejemplo n.º 1
0
        public IActionResult CareerSummary()
        {
            CurriculumVitaeViewModel model = new CurriculumVitaeViewModel();

            _curriculumVitaeViewModelFactory.PerpareCurriculumVitaeViewModel(model, false);
            return(View(model));
        }
Ejemplo n.º 2
0
        public IActionResult Index()
        {
            //From demo and development purposes

            /*
             * Todo must implement CV factory to populate the model
             * */
            CurriculumVitaeViewModel model = new CurriculumVitaeViewModel();

            _curriculumVitaeViewModelFactory.PerpareCurriculumVitaeViewModel(model, true);
            return(View(model));
        }
Ejemplo n.º 3
0
        public IActionResult UpdateCareerSummary([FromBody] CurriculumVitaeViewModel request)
        {
            var bSuccessfull = _curriculumVitaeService.UpdateUserCurriculumVitea(new CurriculumVitea()
            {
                Id = request.Id,
                DateLastUpdated  = DateTime.Now,
                CareerSummary    = request.UserCareerSummary,
                IntegratorUserID = _userService.GetUserID()
            });

            return(new JsonResult($"{{Success:{bSuccessfull}}}"));
        }
Ejemplo n.º 4
0
        public IActionResult CurriculumVitae()
        {
            //From demo and development purposes

            /*
             * Todo must implement CV factory to populate the model
             * */

            CurriculumVitaeViewModel model = new CurriculumVitaeViewModel()
            {
                Id                = 1,
                UserPicture       = new byte[10],
                UserFirstName     = "Brendan",
                UserLastName      = "Wood",
                CurrentJobTitle   = "Senior IT Lecturer",
                UserCareerSummary = "Summarise your career here. [Content]. You can download this free resume/CV template here. [Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content][Content].",
                ContactDetails    = new List <UserContactDetailViewModel>()
                {
                    new UserContactDetailViewModel()
                    {
                        Id = 1,
                        ContactDetailType  = "Email",
                        ContactDetailValue = "*****@*****.**",
                        DateLastUpdated    = DateTime.Now
                    },
                    new UserContactDetailViewModel()
                    {
                        Id = 2,
                        ContactDetailType  = "Cell",
                        ContactDetailValue = "0823349956",
                        DateLastUpdated    = DateTime.Now
                    }
                },
                UserInterests = new List <UserInterestViewModel>()
                {
                    new UserInterestViewModel()
                    {
                        Id            = 1,
                        Interest      = "Golf",
                        InterestLevel = 70.0
                    }
                },
                UserLanguages = new List <UserLanguageViewModel>()
                {
                    new UserLanguageViewModel()
                    {
                        Id = 1,
                        CanSpeakAndWrite  = true,
                        IsPrimaryLanguage = true,
                        Language          = "English"
                    },
                    new UserLanguageViewModel()
                    {
                        Id = 2,
                        CanSpeakAndWrite  = true,
                        IsPrimaryLanguage = false,
                        Language          = "Afrikaans"
                    }
                },
                UserJobSummary = new List <UserJobSummaryViewModel>()
                {
                    new UserJobSummaryViewModel()
                    {
                        Id = 1,
                        IsPrimaryJobFunction = true,
                        JobTitle             = "Senior Lecturer",
                        JobSkillSets         = new List <UserSkillViewModel>()
                        {
                            new UserSkillViewModel()
                            {
                                Id         = 1,
                                JobSkill   = "Windows Server 2000",
                                SkillLevel = 70.0
                            },
                            new UserSkillViewModel()
                            {
                                Id         = 2,
                                JobSkill   = "Window Internet Information Server",
                                SkillLevel = 40.0
                            }
                        }
                    },
                    new UserJobSummaryViewModel()
                    {
                        Id = 2,
                        IsPrimaryJobFunction = true,
                        JobTitle             = "System Administrator",
                        JobSkillSets         = new List <UserSkillViewModel>()
                        {
                            new UserSkillViewModel()
                            {
                                Id         = 1,
                                JobSkill   = "Linux Server",
                                SkillLevel = 90.0
                            },
                            new UserSkillViewModel()
                            {
                                Id         = 2,
                                JobSkill   = "Window Internet Information Server",
                                SkillLevel = 86.0
                            }
                        }
                    }
                },
                UserQualifications = new List <UserQualificationViewModel>()
                {
                    new UserQualificationViewModel()
                    {
                        Id = 1,
                        EductaionalInstitution     = "North West University",
                        QualificationLevel         = "Honours",
                        QualificationTitle         = "Bsc Honours Information Technology",
                        YearStartedQualification   = "2016",
                        YearCompletedQualification = "2017"
                    },
                    new UserQualificationViewModel()
                    {
                        Id = 2,
                        EductaionalInstitution     = "North West University",
                        QualificationLevel         = "Degree",
                        QualificationTitle         = "Bsc Information Technology",
                        YearStartedQualification   = "2003",
                        YearCompletedQualification = "2008"
                    }
                },
                UserAwards = new List <UserAwardViewModel>()
                {
                    new UserAwardViewModel()
                    {
                        AwardTitle       = "Employee Of The Month",
                        AwardDescription = "Award desc goes here, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo."
                    }
                },
                UserWorkExperiences = new List <CurriculumViteaWorkExperienceViewModel>()
                {
                    new CurriculumViteaWorkExperienceViewModel()
                    {
                        Company     = "DamelinVaal",
                        JobTitle    = "Senior IT Lecturer",
                        YearStarted = "2001",
                        YearEnded   = "2003",
                        WorkExperienceDescription = "Role description goes here. Providfe Summary of the Work Description and job functions etc.",
                        Achievements   = "{Optional Item}Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.",
                        SkillsEmployed = new List <string>()
                        {
                            "Windows Server 2000",
                            "Window Internet Information Server"
                        }
                    }
                }
            };

            return(View(model));
        }
Ejemplo n.º 5
0
        public CurriculumVitaeViewModel PerpareCurriculumVitaeViewModel(CurriculumVitaeViewModel model, Boolean DisplayFullCurriculumVitae)
        {
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            CurriculumVitea UserCurriculumVitae = _curriculumVitaeService.GetCurriculumVitea(_userService.GetUserID());

            //Load All CV Sections
            if (DisplayFullCurriculumVitae)
            {
                model.Id = UserCurriculumVitae.Id;
                model.UserCareerSummary = UserCurriculumVitae.CareerSummary;
                model.DateLastUpdated   = UserCurriculumVitae.DateLastUpdated;

                IntegratorUser CurrentUser = _userService.GetCurrentLoginInUser();

                model.UserFirstName = CurrentUser.FirstName;
                model.UserLastName  = CurrentUser.LastName;
                model.UserPicture   = _userService.GetUserProfilePictureAsync().Result;


                //adds any awrards the the user may have.//.
                foreach (IntegratorUserAwards item in _userService.GetAwards())
                {
                    model.UserAwards.Add(new UserAwardViewModel()
                    {
                        Id = item.Id,
                        AwardDescription = item.AwardDescription,
                        AwardTitle       = item.AwardTitle
                    });
                }

                //adds any Languages the the user may Speak.
                foreach (IntegratorUserLanguages item in _userService.GetUserLanguages())
                {
                    model.UserLanguages.Add(new UserLanguageViewModel()
                    {
                        Id = item.Id,
                        IsPrimaryLanguage        = item.IsPrimaryLanguage,
                        CanSpeakAndWrite         = item.CanSpeakAndWrite,
                        Language                 = item.SpokenLanguage.LanguageSpoken,
                        LanguageProficiencyLevel = item.LanguageProficiencyLevel
                    });
                }

                //adds any awrards the the user may have.
                foreach (IntegratorUserInterest item in _userService.GetUserInterests())
                {
                    model.UserInterests.Add(new UserInterestViewModel()
                    {
                        Id            = item.Id,
                        InterestLevel = item.InterestLevel,
                        Interest      = item.UserInterest.AnInterest
                    });
                }

                //adds any Qualifications the the user may have.
                foreach (UserQualification item in _userService.GetQualifications())
                {
                    model.UserQualifications.Add(new UserQualificationViewModel()
                    {
                        Id = item.Id,
                        QualificationLevel         = item.QualificationLevel.QualificationLevel,
                        QualificationTitle         = item.QualificationTitle,
                        YearStartedQualification   = item.YearStartedQualification.Year.ToString(),
                        YearCompletedQualification = item.YearCompletedQualification.Year.ToString(),
                        EductaionalInstitution     = item.EductaionalInstitution.EductaionalInstitution,
                        QualificationAverage       = item.QualificationAverage
                    });
                }

                //Adds all user jobs Listed -[Curriculum Vitae Experience Deatils]
                foreach (UserJob item in _userKnowledgeBaseService.ListUserJobByCurriculumVitae(model.Id))
                {
                    var CVWEVM = new CurriculumViteaWorkExperienceViewModel()
                    {
                        Id       = item.Id,
                        Company  = item.Company.CompanyName,
                        JobTitle = item.CoreKbJob.CoreKbJobTitle,
                        WorkExperienceDescription = item.WorkExperienceDescription,
                        Achievements = item.Achievments,
                        YearStarted  = item.DateStarted.Year.ToString(),
                        YearEnded    = item.DateEnded.Year.ToString()
                    };

                    CVWEVM.ListOfHardSkillsEmployed = _userKnowledgeBaseService.ListUserHardSkillsPerUserJob(item.Id);
                    CVWEVM.ListOfSoftSkillsEmployed = _userKnowledgeBaseService.ListUserSoftSkillsPerUserJob(item.Id);
                    //foreach (UserJobSkill InnerItem in item.UserJobSkills)
                    //{
                    //    //var y = CVWEVM.Select(x => x.JobSkill).FirstOrDefault();
                    //    CVWEVM.SkillsEmployed.Add(new UserSkillViewModel()
                    //    {
                    //        Id = InnerItem.Id,
                    //        JobSkill = InnerItem.CoreKbSkill.CoreSkill,
                    //        SkillLevel = InnerItem.UserJobSkillLevel
                    //    });
                    //}
                    model.UserWorkExperiences.Add(CVWEVM);
                }
            }
            else
            {
                model.Id = UserCurriculumVitae.Id;

                IntegratorUser CurrentUser = _userService.GetCurrentLoginInUser();

                model.UserFirstName = CurrentUser.FirstName;
                model.UserLastName  = CurrentUser.LastName;

                model.UserCareerSummary = UserCurriculumVitae.CareerSummary;
                model.DateLastUpdated   = UserCurriculumVitae.DateLastUpdated;
            }

            return(model);
        }