 
 
 class KanbanUsModalController extends ModalBaseController
-    @.$inject = ['$scope', '$rootScope', '$gmOverlay', '$gmFlash', 'resource', "$i18next"]
+    @.$inject = ["$scope", "$rootScope", "$gmOverlay", "$gmFlash", "resource", "$i18next"]
 
     constructor: (@scope, @rootScope, @gmOverlay, @gmFlash, @rs, @i18next) ->
         super(scope)

            @scope.form.id = data.id
            @scope.form.ref = data.ref
            @scope.defered.resolve(@scope.form)
            @gmFlash.info(@i18next.t('kanban.user-story-saved'))

        promise.then null, (data) =>
            @scope.checksleyErrors = data

            return us

        result = {}
        result["project"] = @scope.projectId
        result["status"] = status or @scope.project.default_us_status
        points = {}
        for role in @scope.constants.computableRolesList
            points[role.id] = @scope.project.default_points
        result["points"] = points
        return result

    openCreateUsForm: (statusId) ->
        promise = @modal.open("us-form", {"us": @initializeUsForm(null, statusId), "type": "create"})
        promise.then (us) =>
            newUs = @model.make_model("userstories", us)
            @scope.userstories.push(newUs)
            @formatUserStories()

    openEditUsForm: (us) ->
        promise = @modal.open("us-form", {"us": us, "type": "edit"})
        promise.then =>
            @formatUserStories()

